答:
Moving from a software development role into a managerial or leadership role is something that takes time. I majored in software engineering, emphasizing software engineering process, and minored in business management and communication. Even with that academic experience on how to manage software projects, how to recruit and hire, how to lead teams, and how to communicate with groups verbally and in writing, I found that most managerial and leadership roles, especially in the industry that I wanted to work in, require 5+ years of experience in software engineering (I had 2, including co-ops and internships).

In the mean time, I simply continued my studies on project management topics.

The first thing I would recommend is becoming a good communicator and negotiator. Learn how to have the conversations that matter. Even as a developer, there are decisions that have to be made, with coworkers, clients, and users. Sometimes you have to have the difficult conversations and reach an agreement that benefits everyone. It's not an easy goal, but the book Difficult Conversations: How to Discuss What Matters Most is one that I would recommend that covers this. There are others, like Getting Past No and Getting to Yes: Negotiating Agreement Without Giving In that would also be helpful. These are relevant regardless of what position you're in.

On the more technical side, an understanding of the software development lifecycle is important for leading and managing software teams. Leadership positions probably mean that you are involved with requirements engineering, software system architecture, design, implementation, testing and quality assurance, and maintenance tasks. Although you can't be an expert at all of these, a manager or leader has to at least understand all of them. As a developer, you probably do most of your work in design, implementation, and maintenance, with some testing as well. I would very much recommend books such as Software Requirements (and it's companion, More About Software Requirements), Software Architecture in Practice (although my university switched to Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives after I took the architectures course, and it has been recommended to me), and Metrics and Models in Software Quality Engineering.

From a project management perspective, you can learn about process models and methodologies. There are agile methods, such as Scrum and Extreme Programming and plan-driven methods such as Waterfall and Spiral. There are also methodology frameworks, such as CMMI and the Personal Software Process/Team Software Process. The ones that are relevant to you depend on where you work, in terms of the industry and company. There are a number of books on various methodologies and frameworks, but I would highly recommend Rapid Development: Taming Wild Software Schedules for general software engineering management and software engineering process.

If you wanted to continue your education, you can look at more of a technical management track versus more of a business management track. If you wanted a technical management position, look at software engineering, software engineering management, and engineering management programs. For more of a business management track, you can consider MBA programs, business management, or some engineering management programs that have a strong economics or financial component.


问:
What is likely to be the bottleneck between the SQL Server, IIS and .net when receiving json as text from the DB?
I have spent the best part of a month working on the jQuery Calendar plugin.
The setup is such that all the calendar entries are stored in a table inside SQL Server and im using a single "Select As" statement to construct the json data within the SQL query itself.

This has an execution time of less than one second. However, calling the actual final aspx page in the browser requires a wait of over 240 seconds while the data is passed as json to the browser.

I've tried various methods to get around this.
For example, i tried writing the query results to a json file first, and then calling the file in on the final page. This reduces the page load time to around 90 seconds but still not fast enough.

I've also implemented a function whereby if the data hasnt changed the same json file is returned and is not re-generated. When there is no data that has changed on the calendar this reduced the page load time to around 1 second. Im convinced that writing the json data into the file is the bottleneck here..

But the real question is, is this as efficient as things are realistically going to get with IIS and .net? Or is there room for improvement?

I also dont know which aspect to investigate further now. I dont know whether to consider if IIS is causing the hold up, or the way i have put the project together.

Is there a more efficient solution that the one i have put together above?

答:
In addition to Oded's great suggestion, take the time to boil down the problem. Right now you have IIS, SQL and the rest of your technology stack included in the problem. But, you already discovered that the issue only occurs during serialization. So you need to remove all the fluff.

Write a unit test that only performs serialization using Mock data.  The mock data needs to represent the DB values in size and type (copy/paste the results into a string and parse it into a data structure).

Add to the test until you can reproduce the problem. If a Mock doesn't work, then hook directly into the DB.  Then add another piece...etc.  Then take away from the test until you narrow down the issue to only the technology involved.

If at that point you still can't figure it out, then you will have enough details and code to post a SO question to find the answer to the performance issue.

ContentLicense: CC BY-SA 3.0


问:
How can I progress from a software developer to a software manager or team leader?
I've been a software developer (whether part time or full time) for almost 3 years. I've always been the type of person to have that knack for taking a lead on things, and providing the organization around getting things done. Ever since I was the lead on my senior design project back in college, I felt that this was my true calling, not sitting behind a desk coding. Now, I know I need to understand how to code for other developers to truly respect me. Also, I really do love coding. I work on plenty of side projects at home outside of work, keep up with best coding practices, and try and continuously further my knowledge of the domain.

My main question is, what type of things or opportunities should I be looking out for that will help me progress my career to a more managerial role, rather than a coding role. Like I said, I love to code, however I'd love even more to be able to design things at a high level, and organize the team in such a way to get things done, and monitor their progress, while helping out with technical decisions here and there. These types of things truly make me happy, as opposed to just sitting behind a desk coding all day long.

Obviously one of my main dreams is producing some sort of software on my own that would eventually blow up and make it big, and then beginning to hire a team and do it all myself, but I feel like the chances of that happening are far worse than just altering my career path a little to get where I want to go. I feel like I can garner that same satisfaction doing it for an employer rather than myself. Even though I haven't felt that way before, I feel like it has been mainly because I'm not doing what I TRULY want to do.

Any tips, pointers, or things to keep in mind? Anyone that has done just this, and if so, how did you do it?

答:
I personally have no desire to leave my current position at the moment, but depending where we are in the release cycle I spend anywhere from 10% to almost 100% of my time on tasks other than coding.  If you are patient and observant, there are lots of opportunities you can take to do something other than "just coding" in your current position.  For example:

Volunteer to mentor a new team member.

Become an expert on new tools, processes, or technologies the company is considering adopting.

Volunteer for cross-functional committees.

Speak up about ideas you have.

Invite yourself to design meetings for upcoming features.

Let your manager know you are interested in these kinds of opportunities, and assuming you're doing well with your current responsibilities, he will steer opportunities toward you when they come up.  Initiative counts for a lot.  Most managers will at least let you observe even if they don't think you're qualified at the moment.

OwnerDisplayName: anon


答: I suggest you try something like VRTA to figure out where your bottleneck is. It may show that the server processing took all this time or that it is processing JSON in the browser.</p>

Title: What is likely to be the bottleneck between the SQL Server, IIS and .net when receiving json as text from the DB?

Body:
I have spent the best part of a month working on the jQuery Calendar plugin.
The setup is such that all the calendar entries are stored in a table inside SQL Server and im using a single "Select As" statement to construct the json data within the SQL query itself.

This has an execution time of less than one second. However, calling the actual final aspx page in the browser requires a wait of over 240 seconds while the data is passed as json to the browser.

I've tried various methods to get around this.
For example, i tried writing the query results to a json file first, and then calling the file in on the final page. This reduces the page load time to around 90 seconds but still not fast enough.

I've also implemented a function whereby if the data hasnt changed the same json file is returned and is not re-generated. When there is no data that has changed on the calendar this reduced the page load time to around 1 second. Im convinced that writing the json data into the file is the bottleneck here..

But the real question is, is this as efficient as things are realistically going to get with IIS and .net? Or is there room for improvement?

I also dont know which aspect to investigate further now. I dont know whether to consider if IIS is causing the hold up, or the way i have put the project together.

Is there a more efficient solution that the one i have put together above?


问:
How good does a well-rounded programmer need to be with bit-wise operations?
I have been browsing some OpenJDK code recently and have found some intriguing pieces of code there that has to do with bit-wise operations. I even asked a question about it on StackOverflow.

Another example that illustrates the point:

```<code> 1141       public static int bitCount(int i) {
 1142           // HD, Figure 5-2
 1143           i = i - ((i >>> 1) & 0x55555555);
 1144           i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);
 1145           i = (i + (i >>> 4)) & 0x0f0f0f0f;
 1146           i = i + (i >>> 8);
 1147           i = i + (i >>> 16);
 1148           return i & 0x3f;
 1149       }
</code>```

This code can be found in the Integer class.

I cannot help but feel stupid when I look at this. Did I miss a class or two in college or is this not something I am supposed to just get? I can do simple bit-wise operations (like ANDing, ORing, XORing, shifting), but come on, how does someone come up with a code like that above?

How good does a well-rounded programmer need to be with bit-wise operations?

On a side note... What worries me is that the person who answered my question on StackOverflow answered it in a matter of minutes. If he could do that, why did I just stare like deer in the headlights?

答:
As a programmer of mobile phones I had to deal with this sort of thing.  It is reasonably common where the device has not much memory, or where transmission speed is important. In both cases, you seek to pack as much information as possible into a few bytes.

I don't recall using bitwise operators in 5 years or so of PHP (maybe that's just me), not in 10 years or so of Windows programming, although some lower level Windows stuff does pack bits.

You say "I cannot help but feel stupid when I look at this". DO NOT - feel angry.

You have just met the output of a cowboy programmer.

Does he know nothing of writing maintainable code?  I sincerely hope that he is the one who has to come back to this in a year and try and remember what it means.

I do not know if you cut comments or if there were none, but this code would not pass code review where I was s/w QA manager (and I have been a few times).

Here's a good rule of thumb - the only "naked integers" permissible in code are 0 1nd 1. All other numbers should be #defines, costs, enums, etc, depending on your language.

If those 3 and 0x33333333 has said something like NUM_WIDGET_SHIFT_BITS and WIDGET_READ_MASK would the code have been easier to read.

Shame on whomever put this out in an open source project, but even for personal code comment well and use meaningful defines/enums and have your own coding standards.


问:
TDD negative experience
What is a negative side of your TDD experience? Do you find baby steps (the simplest fix to make test green) annoying and useless? Do you find no-value tests (when test has sense initially but in final implementation checks the same logic as other test) maintanence critical? etc.

The questions above are about things which I am uncomfortable with during my TDD experience. So I am interested whether other developers have similar feelings and what do they think about them.

Would be thankful for the links to articles describing negative sides of TDD (Google is fullfilled by positive and often fanatic articles).

答:
TDD zealots.

For me, they are just one of a long line of religious loonies knocking on my door, trying to prove that my way of doing things is irreparably broken and the only path to salvation is Jesus, Kent Back, or Unit Testing.

IMO, their biggest lie is that TDD will lead you to salvation a better algorithm design. See the famous Soduku solver written in TDD: here, here, here, here and here

And compare it Peter Norvig sudoku solver done not by using TDD, but using old-fashioned engineering: http://norvig.com/sudoku.html

Title: TDD negative experience


问:
What special considerations are needed when designing databases to hold financial records?
I hope this question isn't too broad. In the future I may need to add some accounting and financial-tracking systems to some applications (mostly web-based applications, but my questions pertains to desktop apps as well).

Now, creating a simple record of financial transactions is theoretically easy. One database table with a few columns could do the job. Even MS Access, Excel, or even just a plain ASCII text file could be used to store transaction dates, account IDs, and dollar amounts. However, I feel that even a frequently backed-up SQL table with transactional integrity might not be robust enough for serious financial tracking.

I hear terms like "double-entry accounting", and I get the feeling that most financial tracking apps (for example, Mint.com, or GnuCash) have a much more complicated data structure or process in place to make double-sure that everything adds up perfectly, exactly as it should, and that no data is ever lost or corrupted.

My question is: When designing an app to track financial transactions, what special design considerations should be made? It seems like there could be so many potential issues... issues with rounding precision, parity checks, some kind of audit process, special backups, security/encryption, extra ways to protect data in the case of a crash mid data-entry....  I don't really know what I should be asking specifically, but I get the feeling that the programming industry has a set of best practices I know nothing about. What are they?

Edit:

It looks like I opened a bigger can of worms than I expected. To clarify, I'm thinking specifically of two types of apps:

"Check registry"-type apps like GnuCash or Quicken that maintain a record of an individuals transactions for their own use.

Apps that track invoicing/credit/or "points" for vendors and customers that deal with a company.

I probably will not be doing any direct banking or (AFAIK) anything that has a ton of finance-related government regulations attached to it.

答:
Accounting is often about verification. As long as you remember this and understand the relationship between each entity, its pretty hard to get it wrong.

I'll try to list out as many checks as I can but will invariably miss some, hopefully it will be enough for you to get started on your own digging.

Total Debits == Total Credits, this is true whether you are talking about the ENTIRE set of accounts or just one transaction in isolation. If it doesn't tally, you missed at least one posting somewhere. This is how the General Ledger balances itself.

Accounts Receivables (net debits to the controlling account) == Total billed (sum total of all billable amounts) - Total received (sum total of all payments received). This is an example of how the transaction totals in actual PHYSICAL and tangible document terms should balance with the General Ledger (double entry).

Bank Balance (according to your bank statement) == Your General Ledger total for that account + whatever cheques received that are not deposited - whatever cheques issued that are not banked in. This is an example of how bank/cash accounts tally with the General Ledger.

As you can see, every transaction, sub ledger, even stock, ties in directly to the General Ledger.

If you are doing unit testing, its pretty easy to run tests that ensure these balances exist every time you insert/update transactions as long as you know what to check for.

Of course there are more balances to check/tally but you should get the gist of the work required. Essentially, everything balances against everything else, whether it be physical documents, General Ledger items, bank statements. Its supposed to be a perfect balance, or in cases where you are lazy to deal with rounding, close to perfect.

The more checks you can perform while you are developing it, the lesser the odds of you getting something wrong.

BTW, when you deal with rounding, try to go with decimals instead of floats, it will save you a lot of headaches down the road. :P


问:
Programming with ADD/ADHD
I have diagnosed ADD.  Mild but enough to affect my work:

Easily distracted

Can't concentrate on one project at a time

Addicted to the web

Procrastination

etc.

What strategies do you use to compensate?

One clarification

I have real  ADD.  I was diagnosed with it when I was a child and have wrestled with it all my life.  I am not talking about artificial ADD, which is induced by media overload.

Update

I just read this description ADD/ADHD.  It's a great description, especially for us programming ADDers:

I am like a toolbox,

  with all the tools I will ever need

  lain gently and neatly in the box,

  ready for me to use them.

  The toolbox is translucent

  so I can see them there.

  The key to the toolbox is locked inside of it.

答:
I really don't think you can be a programmer if you suffer from ADHD - sorry.... Considering the necessary high-concentration levels.

I've been accused of hating or being negative.

This is nonsense, I feel great sympathy with anyone suffering from such problems.

I am just pointing out that programming requires higher concentration levels than the norm, yet ADHD means you have lower concentration levels than the norm.

So programming will be a problem. I'm being honest. There are many other good careers in IT, such as design work, that wouldn't require high concentration levels.

If you can solve the ADHD then programming would always be an opition again.

UPDATE:
Now I'm accused of saying high concentration levels means you are smarter!!!

Again, that is nonsense. I don't see that correlation necessarily.

OwnerDisplayName: lamcro

ContentLicense: CC BY-SA 2.5

Title: Programming with ADD/ADHD

OwnerDisplayName: Oak


答: Turn off your web browser so you cannot access StackOverflow during work hours.</p>

Title: Programming with ADD/ADHD

Body:
I have diagnosed ADD.  Mild but enough to affect my work:

Easily distracted

Can't concentrate on one project at a time

Addicted to the web

Procrastination

etc.

What strategies do you use to compensate?

One clarification

I have real  ADD.  I was diagnosed with it when I was a child and have wrestled with it all my life.  I am not talking about artificial ADD, which is induced by media overload.

Update

I just read this description ADD/ADHD.  It's a great description, especially for us programming ADDers:

I am like a toolbox,

  with all the tools I will ever need

  lain gently and neatly in the box,

  ready for me to use them.

  The toolbox is translucent

  so I can see them there.

  The key to the toolbox is locked inside of it.

OwnerDisplayName: Phil Wright


答: Try organizing your time into small and simple tasks </p>

Title: Programming with ADD/ADHD

OwnerDisplayName: nicudotro


答:
You probably know your condition best, but here are some suggestions.

Take regular breaks. This applies to everyone, but even more so, I'd think, for someone with ADD.

Get enough sleep and eat well. If you don't, your attention span will be even worse, and you don't need that.

As for procrastination, read up on some blogs about procrastination, there are a bunch of good things written about it, find out what works for you.

Web addiction is a tricky one. I had a friend with ADD that used dual monitors, one for "fun" and one for work. That way he'd be able to tell when he spent too much time on the funitor ;) Your mileage may vary on this though.

Are you on some medication? Is there any or is your disorder too mild? Ask your doctor for advice, perhaps he can recommend some good meds :)

All in all, take care of yourself. Being well fed and alert is never a bad idea.

/Ace

Title: Programming with ADD/ADHD

OwnerDisplayName: Ace


答:
Are you SURE you're doctor is a good one ? I mean .. from what you say I have ADD too :| .

But I still get my job done even if after an hour I have to stop and look at stackoverflow or dotnetkicks ... or walk around in the room , or talk to one of my team mates .

So .. don't worry ,you can be a programmer just fine.

Title: Programming with ADD/ADHD

OwnerDisplayName: sirrocco


答:
I wasn't diagnosed ADD as a children but was close to it. Apparently I'm OK now as an adult, even though i still can become easily distracted. A few hints:

-Stay off the stimulants: coffee, coke, chocolate, etc.

-Don't listen to music. I've found music screws my focus A LOT (it seems to help others,
but doesn't work for me).

-Stay off the web. Don't keep tabs open on slashdot, digg, every man and his dog's blog or whatever. Just keep an eye on your important email inboxes and google for stuff you need for your work. Delay idle browsing til after work or lunch time.

-Use the 'one step at a time' approach to procrastination. In short, instead of facing a big task, break it down into smaller parts and say to yourself 'i'm going to do this mini-task and then i'll take a break'. You'll see it's easier to do it this way. Same technique as 'i'll just wash a couple of dishes from the stack', and then once you're doing it you just go ahead and do the whole stack. Works for me all the time.

-Take a break every now and then, but not every 20 minutes. A break every 1,5hours works for me (relaxes your eyes and lets you relax for 5 minutes).

Title: Programming with ADD/ADHD


答:
I agree with the comments made.

I am a real believer in the non-existance of ADHD.

This is normal behaviour. We ALL get distracted (just some easier than others - it's not a freaking DISORDER), one problem is that we have easy access to one of the most distracting things ever created, the Internet. We can get almost anything  we want within seconds!

The best thing you can do is get back to baby steps. Create a list of real small tasks, work down the list. The second you realise you are doing something else that is not on the list STOP. If you struggle to get back to what you were doing, move to another task. If the tasks are small enough, it shouldn't create an issue (unless of course there are dependencies).

Dude, ignore the god damn doctor. You have already taken the first step saying "I want to be a programmer and stay focused on my job." Start small, stay on task, if you come off, don't beat yourself up, just get back on to it.

If it gets real bad, take drastic measures, disable websites that you dont need to do your job. (like YouTube, but not MSDN if you are a MS dev).

TBH, there are people in my workplace without "ADHD" that need to take a leaf from your book.

Update Following Comments

There have been several comments made stating something similar to, or along the lines of the following:

I don't know what I am talking about.

My aforementioned friend is wrong/unqualified to make such comments.

I am just simly wrong.

My responses to those would be:

My friend has the right to say what they like, it's their opinion, much like it is your right to comment arguing against it.

If you want to start debating against my comments, you have missed the point.

Like I stated, I personally do not think ADD/ADHD exists. However, even if it does, it does not stop us from BEING IN CONTROL OF OUR OWN LIVES.

The original poster has made the first step in becoming a great developer, I know lots of developers, but the ones I hold in high regard all share one thing in common: they are looking to remove their weaknesses.

The original poster is doing this, and certainly get's my respect for that, I simply tried to offer some advice to them. Getting stuck in the trap in accepting "there is not a lot you can do about it, just take your pills" is a fundamental weakness of attitude.

Hats off lamcro, and I wish him the best of luck, and if you ever need any more advice mate, feel free to ask. I'll support you much more than I would support the Doc.

Title: Programming with ADD/ADHD

OwnerDisplayName: Rob Cooper


答:
I probably don't have as ADD as bad as you, but I've found that the 48/12 rules works quite well in general. So work for 48 minutes and then take 12 minutes off, then start again.

I also tend to have several projects ongoing so I work on the one my thoughts have turned to for the day. In general, I find that if I have enough things open in my dev environment, I end up being distracted from one project by another, rather than a browser.

Sometimes that may not work however, so I've found that identifying (and writing down if necessary) several different ways to get yourself started and away from the browser\tv etc is handy. I think they'll be quite specific to you. For example, perhaps taking up a GTD approach so you always have a list of things to do will help.

One last thought - you might want to repurpose your browser's parental control settings so that you can only browser, say, your mail and a couple of programming sites during workign hours and remove that temptation.

Best of luck, Dan

Title: Programming with ADD/ADHD

OwnerDisplayName: Hmobius


答:
I too have trouble concentrating and getting things done. What i do is i listen to very busy and active music. Like Drum and Bass or Rock, my brain is listening to all the small nuances of the song and it acts like a calming effect for me.

With the music on i feel relaxed and focused. But of course this could be the opposite for you :S

Title: Programming with ADD/ADHD

OwnerDisplayName: Ólafur Waage


答:
Use the development methodology named eXtreme Programming (XP). It's a lightweight, low-ceremony, high-discipline methodology. Specifically, use pair programming, which will help you focus and let you drift away for periods if you have to, without hurting the progress of what you're doing. But don't partner up with someone with ADD. ;]

Also, everyone who belittles the condition should help themselves to a nice cup of STFU.

Title: Programming with ADD/ADHD

OwnerDisplayName: bzlm


答: Get prescription drugs like Adderall or Ritalin. Careful though because they're highly addictive.</p>

Title: Programming with ADD/ADHD

OwnerDisplayName: Roel


答: I knew someone who claimed that doing several things at once (or at least receiving several inputs such as music and TV) while working was actually helpful. He was qualified in physics but worked as a programmer.

Title: Programming with ADD/ADHD

OwnerDisplayName: Hugh Allen


答:
I used and still use Ritalin, but really just a minimum daily dose. I am 33 now, my condition was only diagnosed in adulthood.

The problem is not so much the ADD, but the side effects, especially depression and anxiety, and that can have a very bad impact on productivity.

My suggestion is: Go see a doctor/shrink, and if he prescribes you Ritalin (or something similar), try it. Ritalin has a very short half-life and normally is out of your body within 12 hours. I do not believe it has any long term side effects, unless you abuse (overuse) it.

Alternatively, you can try some calming medicine (or other calming herbs).

Title: Programming with ADD/ADHD

OwnerDisplayName: leppie


答:
Get a big white board and position it where you can easily see and access it.

Make sure that you have SEVERAL things to do.

Write each one on the board, leaving room for notes underneath.

Pick one and start working on it.

If your mind wanders - jot down any ideas under the topic you're leaving.

Pick another topic.

If any ideas about other topics come to mind, record them immediately and try to get back to what you were doing.

Title: Programming with ADD/ADHD

OwnerDisplayName: Brad Bruce


答:
One clarification

I have real  ADD.  I was diagnosed with it when I was a child and have wrestled with it all my life.  I am not talking about artificial ADD, which is induced by media overload.

Currently I am seeing a psych and using Strattera.  Also, I exercise a lot.

I used to do Martial Arts, which also helped, and would like to do it again.

Title: Programming with ADD/ADHD


答:
I've had similar problems as you do. The two main strategies that have helped me are

Only one project at any time: I've suffered from following more projects than I can count on my fingers, each "clamouring" for attention. Now I've radically cut down on projects either by finishing them "once and for all" or by simply dropping them altogether. Earlier this year I've founded a company and now I'm down to three projects: Health, Family and Company.

Separation of concerns: When doing everything on one desk, the risk is high to "drift" from one thing to another. I've removed all procrastination stuff from my work PC and use my Laptop only for "play" and other private internet usage (mails, userfriendly, slashdot). The PC is on my desk, the Laptop in the Living Room. This keeps a healthy distance between Company and private stuff.

Of course these two things are quite general stuff. Some of the smaller, but also helpful things:

No Lurking on IRC/other chat channels. Either I need or give support/community in the project I'm working on or I'm not in that channel.

Close The Mailer. Checking mails because the project just compiles is just stupid, since waiting for a compile is just enough time to see whether or not there is mail. If there wasn't any mail, I've interrupted my flow for nothing and if there was mail, I'd either have to interrupt my flow even more to handle it or punt it anyways. So now, I'm checking my mails three times a day and have reduced my interruption count significantly.

Exercise. Often while programming I feel the urge to jump up and run around in my room. Especially when sitting before the tougher design decisions. Going biking every other day has significantly improved my ability to concentrate on stuff as well as the added benefit of improving overall stamina and well being.

Spent Time Bookkeeping. I've got a simple spreadsheet where I enter my Company time and some private stuff. I keep it to 15 minute chunks, which makes data entry much easier and any smaller units just cause more overhead. If I'm not doing something I can "bill" on the Company and it's between 8:00 and 18:00 I know I'm doing something wrong.

Also, at the end of the week I get a nice report how I spent my time. One big caveat here though. When I started this after finishing university it was a hard blow for me how little time I was spending "productively." It took me quite a while to recognize, that I need to record everything I don't do for Family. Specifically:

I need to record times spent exercising as productive. See above.

I need to record times lost due to external factors: I'm travelling a lot lately and when I've only recorded 25 hours of work in a week, I suck. But if I add the two days I spent on the road that week, I see that I did more than 40 hours. Suddenly "I suck" changes into "the external-factors-that-cause-my-travels suck," which is a much healthier thing to say.

Eat and Sleep Regularly. Stand up at 07:00, Breakfast, Lunch at 12:00, Dinner at 18:00, Sleep from between 22:00 and 23:00.

Appreciate the Small Successes. Even if I'm not yet there, today is better than yesterday and tomorrow will be better than today.

Adjust you Environment. That's quite a broad topic. As a home worker, I got myself a nice new desk and chair which I now use exclusively for work.

Also I really like listening to music, but vocals -- especially in my mother tongue -- distract me incredibly. I've tried instrumental music, which worked for a while until the trance beats got to my nerves. Now I'm going for the complete silence. It might be different for you, but there's only one way to find out for real: experiment and watch yourself while working.

Become Accountable. Get a Conscience. I founded my Company together with an old friend, whom I deeply respect. By his presence and by knowing that our success is now is interlocked, I feel compelled to give my best.

And finally Constant Vigilance! Distractions tend to creep up from every nook and cranny of your life (stackoverflow anybody? ;). Keeping them at bay and managing them will stay a constant struggle. Having said this, I have to close my stackoverflow tabs and get back to programming!

PS: I've talked with someone from my family who is working with ADHD kids. She told me that ADHD is a kind of catch-all/fallback diagnostic (see the ADHD Wikipedia entry for corrobation: DSM-IV V.) and is hard to diagnose "scientifically" since the patient has to be monitored in different settings over a longer period of time AND other causes for the symptoms have to be excluded. Practically ADHD is handled as "the condition helped by the prescribed medicines", since there currently are no globally accepted non-psychiatric assesment test procedures and not enough knowledge about the underlying biochemical functions. Again, quoting Wikipedia: "There are several effective and clinically proven options to treat people with ADHD. Combined medical management and behavioral treatment is the most effective ADHD management strategy, followed by medication alone, and then behavioral treatment."

From what I gathered from the discussion with her, the problem is that doctors often choose (cheap, symptom-oriented) medication over (expensive, cause-oriented) therapy with little regard to the long-term effects on the patient.

Title: Programming with ADD/ADHD


答:
I dont suffer from ADD myself but I am very easily distracted while working so I can sympathize with the OP.

However I have found a very novel solution to the distraction problem while researching another problem that I do suffer from (RSI, aggravated by badly set bone breakages in both arms)

The solution I found was http://www.workrave.com/welcome/ which is a program you can program to alert you to take mini breaks at user specified intervals.
I found that setting it to give me a 30 second break every 15 minutes means that I can concentrate for the full 15 minutes and then when the alert pops up I can take a break and allow my distractions to take over.

There is a countdown for the minibreaks so as it approaches 0 I can force myself back into the mindset I need to concentrate for another 15 minutes.

and of course it has the added benefit of forcing me to take breaks to prevent my RSI from flaring up.

Title: Programming with ADD/ADHD

OwnerDisplayName: Jimoc


答:
My 2c

First off, being in the same boat, and being a successful developer of projects both in a professional and private environments I can tell you that there is nothing stopping you from ADD / ADHD need not be an obstacle for your development. In fact, it can often be a bit of bonus as ADD people tend to create different relational links in their heads (this can be a good thing for inspiration / innovation, but a bad thing when trying to maintain the same view points as others).

Something that might help is to look more at ideas like Agile programming (particularly XP) and also using TDD, as the short turnover time can give you the inspiration to keep focussed. You are always working at something and if you want you can choose different parts of the system to work on at different times. The continues refactoring and improvement of the code will give you a sense of accomplishement that you might otherwise not get when taking a traditional waterfall approach.

Title: Programming with ADD/ADHD

OwnerDisplayName: Furis


答:
Within the methodologies of eXtreme Programming, there is a technique called Pomodoro Technique which is "a timeboxing strategy originally meant for optimizing personal work and study". The technique "is a time boxing strategy people can apply in any situation, e.g., homework, study, cleaning house, and indeed software development". I think this may help you focus your efforts.

Within Agile software development methodologies, the Pomodoro technique is usually held in high regard.

In essence, the technique was invented by someone who suffered from the alt-tab syndrome you describe, and it successfully helped them counter this.

Title: Programming with ADD/ADHD


答:
I was diagnosed with ADHD when I was 10 or so.  For the past 16 years I have been on a myriad of medications and therapies to deal with it.

I have had many problems with trying to work when there are even slight distractions.  I used to rely on Adderall to stay focused, but would find myself getting too involved in projects at times.  I have stopped taking any medication (a little over a year now) and it has been hard to deal with, but very rewarding.

I find it easier to keep myself focused when I have a good nights rest and have a scheduled routine.  I wake up at the same time every day (weekends included) and use my breaks to the fullest.  Playing footbag during breaks is a great way to distract yourself and get exercise at the same time.  I do find myself straying from time to time, but everyone gets distracted sometimes.

Title: Programming with ADD/ADHD

OwnerDisplayName: Dr. Bob


答:
I am a programmer and have been for the last 8 years and I was recently diagnosed with ADHD! Also, I am a REAL programmer, in that I can program in Assembly Language, as well as these OOP's that call themselves programming languages. Even taught myself, Java and Perl last summer. You probably don't have a clue, what Assembly Language is, right? Well, I am able to program down to the bit! Granted it is an old ancient language, there is not one language that is more powerful out there (my opinion)!

Unfortunately sometimes, we feel that our opinions are correct when in fact they are very far from the truth! People with ADHD are able to focus and concentrate on levels that far exceed the "normal" brain; it is called hyperfocusing. Knowledge is power, so educate yourself before giving awful advice and opinions that have no merit.

OwnerDisplayName: lamcro

Title: Programming with ADD/ADHD


答:
Today I decided to give up being a programmer :(  I am technically very able and academically very intelligent (according to my previous work colleagues and bosses).  However my focus issues and disorganisation is so severe that I rarely finish a project.

It really sucks.  It has always felt like I have a brand new Ferrari... but I've lost the keys, so I have to drive an old banger.  That is how frustrating it is having some great skills at something but being too disorganised to utilise those skills :(

Good luck to you though... I wish I had the focus and organisational skills required to be successful in life.  It pretty much ruins my whole life.  It's even hard keeping a social life in tact.  I will quite often forget friends birthdays and such even though I'm really caring as a person... if you have memory issues though people think you don't care :(

I know someone with a photographic memory for dates who ALWAYS remembers everyone's birthdays or anniversaries or whatever... and of course he LOOKS more caring.  Life is so f£$%ing sh!t if you have severe ADHD.  It f£$%s up your whole life :(  It's worse than being physically disabled!

Title: Programming with ADD/ADHD

OwnerDisplayName: Mike


答:
Three interesting facts:

There is a statistically demonstrated high correlation between productive (especially outside-the-box) software development skills, and diagnosis for ADHD.

To OP: I think the best thing on your list is having someone you trust, to whom you are accountable.

ummm ... I can't remember the third ...

Title: Programming with ADD/ADHD

OwnerDisplayName: le dorfier


答:
While I'm not qualified to offer any medical advice, as a perpetual graduate student I can say that a lot of time it's about playing a game of control with yourself.

If your problem is that you go online every minute just to look at some random site because you have a real urge to, it is sometimes effective ot make the cost of "instant gratification" higher: For example, I try to completely turn off my network when I can (not all workplaces allow this). I only go on between tasks and for a few minutes. Usually connecting to a network takes 30-40 seconds, so it often battles the urge.

Another way is to promise yourself a "gift" after you're done with a task: a break, a cigarette, a snack, a game of Halo, whatever... And you know that you're not getting to that unless you finish that unit of work, that helps reduce time spent online once you do go online.

Title: Programming with ADD/ADHD

OwnerDisplayName: Uri


答:
I shut mail down periodically during the day.

I have my shooting hearing protectors with me at work.  When I am wearing them, I can't hear the 4-8 conversations going on around me.

I have a a sign on a strip of duct tape that I can use to block the entrance to my cube.

The sign is a parody of our not-at-work sign that says  "I'M OUT OF MY MIND, PLEASE COME BACK LATER"

Title: Programming with ADD/ADHD

OwnerDisplayName: EvilTeach


答: Get professional help. and I'm not being cynical. I know people who's life turned upside-down since they started using Ritalin.</p>

Title: Programming with ADD/ADHD

OwnerDisplayName: Orentet


答:
Anonymous said: "No, the answer is that they conviced you that you have ADHD/ADD and you bought it because you trust the doctor. Giving a name to a set of symptoms, does not mean that the "illness" really exists"

What a fool!  ALL illnesses and conditions are a set of symptoms that a name tag is attributed to.

Let's give an example... cancer is a name given to a set of symptoms, but it doesn't mean that this "illness" really exists.  Dur!

Whether you call a set of symptoms ADHD or X does not matter.

Example:

Say there are 3 symptoms, A, B and C.

One could describe an illness as follows:

Illness X = {A B}  Illness Y = {C}

Or

Illness P = {B C} Illness Q = {A}

As a doctor I could treat illness P by helping symptoms B and C, or I could treat illness X by treating symptoms A and B.  So it doesn't always matter what labels we use.

The REAL issue in how to label conditions is how symptoms statistically occur together in the general populace.  e.g. does symptom B often occur with symptom A?  If so it would be sensible to designate it as illness X = {A B}...  BUT if symptom A rarely occurred alongside symptom B then that designation would be foolish.  Anyone can see this surely!?

So the real questions to work out if an illness "exists" are as follows:

1) Do the symptoms themselves exist?
2) Do enough of the symptoms statistically occur together more than say 60% of the time (or whatever) in the general populace?

In ADHD's case 1) and 2) seem to be true.  Therefore it exists!  Simple as!

If you're going down your route of reasoning then we get in to foolish philosophy.  Does a chair exist?  It's just an arbitrary name for a set of "symptoms", e.g. 4 legs, and a back... but would then a table with a piece of wood nailed to one side to be a "back" then be a chair and if not why not!?  You get my point, it's easier to get along in the world if we have some understanding of what a chair actually is.

It's the same with illnesses... especially neurological ones, as we currently understand the human brain less than 1%... so it's our best shot!

Another one might be PTSD, you might say it doesn't exist, but as a label it is useful in treating people with a particular subset of symptoms.  If you don't understand what I'm trying to say then forget it.

You can't disagree that the symptoms of ADHD exist, and statistically it has been agreed that the symptoms of ADHD occur together enough to be useful in diagnosis.  Once someone is labelled as having such a condition they can then use that SHORTHAND to be treated by professionals that specialise in that particular label.

To highlight this there are subset of illnesses within higher level illnesses.  e.g. cancer usually designates some form of tumour(s), but there are so many different types of cancer... but why?  Because they need to be treated differently.

The problem with MOST human beings is that we often don't believe someone's difficulties until WE experience them directly!  I am evolved enough to give people who seem to be genuine the benefit of the doubt... but hey I work at empathy, as it's certainly not a natural state of most people.

Heart disease is a set of symptoms too!  Maybe that doesn't exist either lol.

As a human race in general we need to improve our empathy skills.

Title: Programming with ADD/ADHD


问:
Stuff every programmer needs while working
I've been tasked with creating a fun and relaxing environment, one thing I know that I want is ergonomic mice and keyboards, others have suggested exercise balls and bands.

What is it that every programmer needs while working? What might not be necessary but would be nice to have anyway?

Note: this question was asked previously, but has been recommended to be posted here. See this link for the previous responses: https://stackoverflow.com/questions/3911911/stuff-every-programmer-needs-while-working-closed

答:
Headphones + white noise generator

I either use the one at SimplyNoise, or a free iPhone app called White Noise Lite


答:
One way to increase the difficulty of distraction is to map offending sites (like this one ;) to 0.0.0.0 in your HOSTS file, effectively blacklisting them. </p>

<p>I've done this at times, it helps raise the mental barrier between me & distraction. </p>

Title: Programming with ADD/ADHD

Body:
One way to increase the difficulty of distraction is to map offending sites (like this one ;) to 0.0.0.0 in your HOSTS file, effectively blacklisting them.

I've done this at times, it helps raise the mental barrier between me & distraction.

OwnerDisplayName: StuffMaster


答:
Anyone who gives "advice" on how to overcome a REAL subset of conditions is a fool AND unsympathetically cruel.

It's like saying to someone Multiple Sclerosis doesn't exist, and just saying to someone just walk!  It's easy, just put one leg in front of the other, and JUST walk.  Forget what the doctor says, you can do it if you think positively... utter rubbish!

Example: some people are naturally more thick skinned than others, and yet they DARE "teach" others how to be laid back... lol how delusional.  Someone's psychological traits are NO different than their sporting abilities, e.g. coordination and balance.  If Tiger Woods came to someone with poor coordination and just "taught" him how to be a great golfer it wouldn't happen, even if taught from a young age... sure the person would be better if taught... but you are fighting against someone's natural abilities.

A better example might be mathematical ability... I find maths quite easy but some people don't.  I find drawing REALLY REALLY REALLY REALLY hard!  I enjoy it but it's just unbelievably hard... I've had artist friends try and teach me and sure I've improve BUT I'm still really lame!  Some people have the same teachers and yet produce VERY VERY different results... this is because everyone has different natural affinities... anyone who doesn't agree with this is delusional.

The problem with modern society (particularly America) is that so many people believe that if you try hard enough you WILL succeed in anything you try... here's the latest newsflash... absolute BS.  A lot of people can't admit this.  The REAL key to success is finding something that fits your NATURAL abilities, and then doing that as a career... if you work hard at that you have a good chance of being moderately successful, but some people will not do well even if they play to their natural skills, as their best skills might not be that good.

My message is that if you're good at something (and that includes neurological skills that most people take for granted like "focus" and "organisational skills") then don't think that just because it comes naturally to you that someone's difficulty doesn't exist.  Only an utter fool would act that way!

Sure SOME people DO make excuses, but the majority of people I meet are doing their best.  Indeed I would argue that EVERYONE is doing their best given their nature / nurture, e.g. their gene's, their upbringing and environment.  It takes both intelligence and empathy to understand this... if you don't then one of those is missing... harsh of me to say but it's true.

Title: Programming with ADD/ADHD


答:
I also have ADHD served with depression (cold) .. I was diagnosed early age, Ritalin kinda stuff also existed back then but my real problem was the notoriious Tourette's syndrome. So the doc (several docs) did not want to prescribe me with ritalin. So I graduated "as is" from the high school. Then later, somehow I lost that great respect to doctors, thank God and started taking Ritalin. But that happened after I was introduced to marijuana :) Sad story goes on like that ... People always used to tell me I was smart but I was kinda scared to take the IQ test. .. maybe I was afraid of seeing the potential i have and looking back to my life, what I have done with it and suicide. The parmanent solution to a temporary problem some may say but pain hurts. The score was about 140 and I said to myself I will start programming, the advanced LEGO as I see, the only thing I really loved as a child. Object Oriented satisfies this enthusiasm I have and I learn new stuff when I can + feel like to ... I use Ritalin, when ritalin (aka the Kid coke) kicks the depression in I give a call to mary jane .. Thats how I am living ... My point is I think we need our own developer froum as we do need "our own approach" for everything in life .. That includes women :) peace!

PS: A programmer might need high concentration levels, as you need high speed for inter planetary travel but the speed is never enough huh :) Maybe our weird ways of connection making may help bending the space for you guys ...

Title: Programming with ADD/ADHD

OwnerDisplayName: NeverEnough


答:
There's one aspect of ADHD that appears to be being neglected here:  hyperfocus.  It's a common misconception that ADHD means that you can't pay attention to things.  In reality, people with ADHD have trouble regulating what they pay attention to.  This can play in your favor though.  People with ADHD can be totally oblivious to things that would totally destroy a "normal" developer's ability to pay attention to things.

I find that it's more difficult for me to get into the "zone" than other developers, but once I'm there, it's diffuclt to get me out.  I've been known to start coding and then look down at my watch and realize that I just spent hours hammering out code without ever thinking about doing anything else.

In fact, I would say that a bigger issue for me is that I tend to go for long periods of time coding and neglect to take care of basic necessities.  So make sure that you take a break every once in a while, don't skip meals, and drink plenty of water!  (the last two are even more important if you're taking medication)

Title: Programming with ADD/ADHD

OwnerDisplayName: Jason Baker


答: I'm a total newcomer to this board (introduced by a programmer friend), and my work is in the field of psychiatry, not computers. I told my friend that the comments on this thread are some of the most intelligent offerings I've seen with regard to ADD and the problems associated with challenging work like programming. As a 62 year-old professor of psychiatry at a major medical school, I can say with some confidence that you guys are offering one another some very sound advice. Even some of the gripes and complaints have pearls of wisdom in them. Naturally I have my own biases and beliefs about all this, being a shrink, but I even agree with some of the negative comments about my own profession. Doctors are not always helpful. The bottom line from the standpoint of good science and evidence-based medicine is that what David S. says in the first post (above) makes a lot of sense. Medication can be very helpful, even life-saving, and certainly career-saving, but it has to be used wisely and prescribed by a thoughtful, caring clinician. Using other substances like marijuana and alcohol can be a slippery slope leading to disaster. It's a challenge being as bright and capable as you guys are, and life is never easy for people who are smart enough to look past the daily grind, thinking at the philosophical level. Thanks for creating this forum!  John T. </p>

Title: Programming with ADD/ADHD


答: Proper nutrition, sleep, and hydration are extremely important for proper mental functioning. Cut back on coffee and sugar and drink water regularly. I've heard numerous times that Omega-3 fatty acids (found in Cod Liver Oil) and magnesium supplements are known to greatly reduce ADD symptoms.</p>

Title: Programming with ADD/ADHD

OwnerDisplayName: Chris Tek


答:
Even if ADHD is a "personality trait" or a "personality flaw" and not something with an easily-identifiable chemical cause in the brain, the end result is the same and the need for solutions is the same.

And either way, it's not something anybody should use as a crutch or an excuse.  We all have strengths and weaknesses and those of us with ADHD have a very peculiar and particular set of them.

That's why I find the ADHD naysayers totally misguided.  Who cares if it's "real?"  There are studies that suggest that there are indeed physical phenomena in the brain unique to ADHD, but like I said, that's besides the point to me.

I used to think ADHD was a scam to sell medicine to kids (mis)raised by crappy parents. Perhaps that's true to a certain extent, but I'm pretty sure nobody's getting rich from the $20 generic Adderall my doctor prescribed me. Anyway...

Non-Tech Solutions

My biggest single leap in dealing with mild ADHD (inattentive type) was reading the book "Getting Things Done."  While not specifically written for those with ADD, the core message of the book is a set of concrete methods to reduce mental clutter and focus on the task at hand.  Valuable to all, I think, and particularly so for ADHD sufferers!

My second biggest leap was reading books like "You Mean I'm Not Lazy, Stupid, Or Crazy?"  Some things in the book will apply to you and some won't. For me it was really just important to know I wasn't alone.

My third biggest leap was getting prescribed stimulant medication. There are a number of medications and they all have drawbacks but the stimulants seemed to have the mildest ones. This was an important step but pales in comparison to the other two.  No medicine can compare to learning coping skills and working hard and believing in one's self.

Tech Solutions

Hiding the browser or disconnecting the Internet doesn't work for me because I need to consult it often.  Blocking specific known timesucking sites (like S.O.!  haha) was somewhat effective for me.

Another thing that works for me, and might sound slightly odd, is using virtual machines.  My OSX laptop is my general-purpose computer.  But the Win 2K3 VM running in it is "for work" and putting that in fullscreen mode helps me focus on work.  In the VM I just have Visual Studio and other development tools.  No "toys" or IM.

Working at night helps a lot because there are less distractions.  Obviously, it's not always practical.

Investing time and money in keeping my machine optimized helps.  If I have to wait more than a second for something to happen I can get distracted easily.  When my computer is fast and snappy I can use it at the speed of thought.  I seem more concerned with this than your average person so maybe this doesn't apply to you.  If this does, install at least 4GB of RAM and an SSD if you can afford it.

Most of all, good luck!  ADHD is beatable and has probably given you some genuine gifts, such as hyperfocus, as well.  Find out what you're good at and work to your strengths.  :-)

Title: Programming with ADD/ADHD

OwnerDisplayName: John Booty


答:
From your example there are some things you should absolutely know without really thinking.

1143           i = i - ((i >>> 1) & 0x55555555);

You should recognize the bit pattern 0x555... as an alternating bit pattern 0101 0101 0101 and that the operators are offsetting it by 1 bit (to the right), and that & is a masking operation (and what masking means).

1144           i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);

Again a pattern, this one is 0011 0011 0011.  Also that it's shifting two this time and masking again.  the shifting and masking is following a pattern you should recognize...

1145           i = (i + (i >>> 4)) & 0x0f0f0f0f;

the pattern solidifies.  This time it's 00001111 00001111 and, of course, we're shifting it 4 this time.  each time we are shifting by the size of the mask.

1148           return i & 0x3f;

another bit pattern, 3f is a block of zeros followed by a larger block of ones.

All these things should be obvious at a glance if you are "Well Rounded".  Even if you don't ever think you will use it, you will probably miss some opportunities to vastly simplify your code if you don't know this.

Even in a higher level language, bit patters are used to store MUCH larger amounts of data in smaller fields.  This is why you always see limits of 127/8, 63/4 and 255/6 in games, it's because you have to store so many of these things that without packing the fields you will be forced to use as much as ten times the amount of memory.  (Well, the ultimate would be if you needed to store vast numbers of booleans in an array, you could save 32-64 times the amount of memory as you would use if you didn't think about it--most languages implement booleans as a word which will often be 32 bits. Those that don't feel comfortable at this level will resist opportunities to store data like this simply because they are scared of the unknown.

They will also shy away from things like manually parsing packets delivered over the network in a packed format--something that is trivial if you aren't afraid.  This could take a game requiring a 1k packet down to requiring 200 bytes, the smaller packet will slide through the network more efficiently and bring down latency and enable higher interaction speeds (which may enable entire new modes of play for a game).

Body:
I have been browsing some OpenJDK code recently and have found some intriguing pieces of code there that has to do with bit-wise operations. I even asked a question about it on StackOverflow.

Another example that illustrates the point:

```<code> 1141       public static int bitCount(int i) {
 1142           // HD, Figure 5-2
 1143           i = i - ((i >>> 1) & 0x55555555);
 1144           i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);
 1145           i = (i + (i >>> 4)) & 0x0f0f0f0f;
 1146           i = i + (i >>> 8);
 1147           i = i + (i >>> 16);
 1148           return i & 0x3f;
 1149       }
</code>```

This code can be found in the Integer class.

I cannot help but feel stupid when I look at this. Did I miss a class or two in college or is this not something I am supposed to just get? I can do simple bit-wise operations (like ANDing, ORing, XORing, shifting), but come on, how does someone come up with a code like that above?

How good does a well-rounded programmer need to be with bit-wise operations?

On a side note... What worries me is that the person who answered my question on StackOverflow answered it in a matter of minutes. If he could do that, why did I just stare like deer in the headlights?


答:
This particular piece of code is taken straight out of the book Hacker's Delight, figure 5.2.  Its online in C (the pop function) here.  Note the author now recommends using updated versions:
http://www.hackersdelight.org/HDcode/newCode/pop_arrayHS.c.txt

If you want to learn these sorts of micro-optimizations I'd suggest that book; its fun, but unless you are doing very low level bit programming often you probably won't understand it; and most of the time your compiler will be able to do many of these sorts of optimizations for you.

It also helps to rewrite all the hexadecimal numbers in binary to understand these sorts of algorithms and work through them on a test case or two.

Title: How good does a well-rounded programmer need to be with bit-wise operations?


问:
Why has the rate of programming language popularization slowed down in recent decades?
If I understand correctly, there was a huge birth of programming languages during the early decades of computing, but then things have stabilized.

Basically, why are many universities and industries still using languages such as C and C++ (which were created decades ago), when there have been plenty of decades since then to improve upon and create more effective (and human-friendly) languages?

答:
Simply put, because there are no new successful languages in similar problem spaces. There are no languages which perform the same job as C++, but better enough to justify throwing away all of the experience, tools, existing codebases, etc. The only language that I can name that's even made a half-assed attempt is D, and it resembles C# more closely.

Unlike C. C exists for two reasons: C++ is an impractical language to implement, so there are some (very small) problem spaces in which C++ won't fit, and because people are too ignorant to understand how incredibly poor it is. C is not suitable for teaching as a general-purpose language any more.

One of the reasons that there are fewer new languages is because successful languages are much larger and more complex to implement competitive toolchains.

I would suggest that another reason is because people hardly know the languages they have. Especially a language like C++. You find many more people with incredible misconceptions than you do people who actually know how to use the language. People who were only taught "C with Classes". You're asking people who can't grasp that std::vector<T> is better than malloc and free to learn something? Good luck.


答:
You've got the wrong impression. There's a lot of "new" languages out there. Google alone has released Dart and Go within little more than a year.

As for what is used at the university. If you take MIT, they went from LISP to Scala to Python within the last 2 decades or so. Some universities try hard to pick the right languages for their courses and some just use whatever they think is established and stick to that.

Title: Why has the rate of programming language popularization slowed down in recent decades?

Body:
If I understand correctly, there was a huge birth of programming languages during the early decades of computing, but then things have stabilized.

Basically, why are many universities and industries still using languages such as C and C++ (which were created decades ago), when there have been plenty of decades since then to improve upon and create more effective (and human-friendly) languages?


问:
Is donationware non-commercial?
I use quite some "non-commercial" applications when working on software projects. For clarification, I mean developing applications here, for example smartgit, not libraries or anything that gets shipped.

Is it legal to provide a donation button for projects made using the non-commercial of certain applications?

I know, I know, "consult a lawyer". Here's the real world: I'm a 16 year old hobbyist programmer that doesn't have the time nor money to consult one - a quick question on the internet would probably be a better idea.

答:
My gut feeling on this says that it is non-commercial software. Donationware is, by definition, complete, working, free (open-source optional) software. Payment is not required to use any features of the system. People aren't paying for the use of the software - they don't have to in order to use all of the features. Instead, they are giving you a gift.

However, I would recommend two things. First, consult a lawyer who knows your local laws. Second, ask the creator(s) of the applications designed for non-commercial use. Either of these would give you answers that you need.

Title: Is donationware non-commercial?


答:
If the donation button doesn't impact the user experience, one could argue that the software is as non-commercial as it would be without the donation button.

Ultimately you will have to check the laws of your country either way, at least to know how such revenue is treated according to tax law.

Title: Is donationware non-commercial?

Body:
I use quite some "non-commercial" applications when working on software projects. For clarification, I mean developing applications here, for example smartgit, not libraries or anything that gets shipped.

Is it legal to provide a donation button for projects made using the non-commercial of certain applications?

I know, I know, "consult a lawyer". Here's the real world: I'm a 16 year old hobbyist programmer that doesn't have the time nor money to consult one - a quick question on the internet would probably be a better idea.


答:
I won't attempt to provide a full answer as Thomas Owens already listed some really good advice (+1 to that).

Just wanted to add few tips/suggestions:

Don't wait for someone to make you lead; just start doing it.  I don't mean goes against your current boss, but instead take initiative to help him out.  If your boss is anything like mine, he's usually overloaded with way too many tasks/meetings on his plate.  If he sees that you are providing direction where he may not have enough time to keep up, he will most likely be more than happy to delegate some management responsibility to you. Over time, if you do this right, your boss will delegate more and more to you (less for him to worry about) and he will more likely support you in taking on more responsibility to a point where you are official lead.

Keep in mind that team building and leadership is more about sociology than technology (from one of popular software methodology books, maybe Brooks).  As a lead, you goal is to understand people and how they behave, which is very different than understanding how computers work.  Without this realization, good engineers make some of the worst team leads because they don't make this mental switch and realize that you can't control people the same way you control machines. In fact, the only approach that seems to work is not to control people at all but to give them direction.  Read, read and keep reading books/articles/blogs on leadership.  One book I could recommend is Management 3.0

... and now i'm off to review the links Thomas posted

OwnerDisplayName: anon

Title: How can I progress from a software developer to a software manager or team leader?

Body:
I've been a software developer (whether part time or full time) for almost 3 years. I've always been the type of person to have that knack for taking a lead on things, and providing the organization around getting things done. Ever since I was the lead on my senior design project back in college, I felt that this was my true calling, not sitting behind a desk coding. Now, I know I need to understand how to code for other developers to truly respect me. Also, I really do love coding. I work on plenty of side projects at home outside of work, keep up with best coding practices, and try and continuously further my knowledge of the domain.

My main question is, what type of things or opportunities should I be looking out for that will help me progress my career to a more managerial role, rather than a coding role. Like I said, I love to code, however I'd love even more to be able to design things at a high level, and organize the team in such a way to get things done, and monitor their progress, while helping out with technical decisions here and there. These types of things truly make me happy, as opposed to just sitting behind a desk coding all day long.

Obviously one of my main dreams is producing some sort of software on my own that would eventually blow up and make it big, and then beginning to hire a team and do it all myself, but I feel like the chances of that happening are far worse than just altering my career path a little to get where I want to go. I feel like I can garner that same satisfaction doing it for an employer rather than myself. Even though I haven't felt that way before, I feel like it has been mainly because I'm not doing what I TRULY want to do.

Any tips, pointers, or things to keep in mind? Anyone that has done just this, and if so, how did you do it?


问:
Is there an industry standard for structuring code and comments?
I've worked with a number of professional teams and it seems that class code structure ranges from highly organized to completely cluttered. I did a project with the State of California recently and they required using specific Regions in my VB code, along with inline XML comments for auto-docs. It was very structured, but in many classes, there was more commenting than code. I'm just curious if there is an industry standard for code structure and commenting.

EDIT

Maybe a more appropriate question would be, what are some good practices to adopt for readability and maintenance and why? I want to set good coding habits early.

答:
There are no standards that exist across all industries that govern code structure. I would doubt that any industry has industry-wide coding standards that deal with comments, file structure, and project organization.

The closest thing that you might find would be MISRA C, which are guidelines produced by the Motor Industry Software Reliability Association to ensure safe, portable, and reliable code in code that runs in the embedded systems in cars. However, as I don't work in the automotive industry, I've never had to deal with this.

Typically, code structure and guidelines are done at the organizational or project level, not across organizations or within industries. If you want examples of how to write good, clean, readable code, I suggest looking at Steve McConnell's Code Complete, Andy Hunt and Dave Thomas's The Pragmatic Programmer, Diomidis Spinellis's Code Quality: The Open Source Perspective, and Robert "Uncle Bob" Martin's Clean Code: A Handbook of Agile Software Craftsmanship - these are the canonical books on how to write the best code you can, regardless of language or platform. Many languages also have style guidelines, such as Oracle's Code Conventions for the Java Programming Language, which can serve as a foundation for an organization or project's code style rules.


答:
Hacker's delight is a derivative work.  The ancestor of all is HakMem from 1972.
http://w3.pppl.gov/~Hammett/work/2009/AIM-239-ocr.pdf

The important thing is to know that the obvious algorithm for any task is not necessarily the best.  There are a lot of cases where knowing of the existence of an elegant solution to a partucular problem is what's important.


答:
I am not a lawyer, so take with a grain of salt.  But it will depend on the particular license.

With GPL asking for donations is 100% fine.

With smartgit's license for free non-commercial use:

3.2.1 If a SOFTWARE Non-Commercial License is agreed upon with the licensee, the licensor grants the licensee the non-exclusive, non-transferable right, which is terminable according to the terms of clause 5 or permanent, to have the SOFTWARE used on a arbitrary number of single-user computers or on a central server or via terminal server clients, simultaneously by a arbitrary number of users, solely for non-commercial purposes. A purpose is non-commercial only if it is in no manner primarily intended for or directed toward commercial advantage or private monetary compensation.

So smartgit doesn't seem to care if non-commercial use is released under a permissive license or donation ware; they care if you are using it for a commercial advantage (no) or eventual monetary compensation (possibly, you ask for donations that are provided as a thank you for use of your software).  If you are a 16 year old kid developing small little apps and expect to get under $500 in donations in a given year; I wouldn't worry about it.  Smartgit isn't likely to sue you over using the wrong license; it would be a very difficult case to sell.  If you start to make loads of money by donation; or decide to start offering paid support; and smartgit is integral to your development cycle that's another question.  The point where smartgit is used part of an enterprise that makes money, then you probably should be paying for the commercial license.

Title: Is donationware non-commercial?


答:
How hard is are bitwise operators to interpret?

I program embedded systems.  I've practiced this stuff a lot.  Your linked question about hash maps with the code

static int hash(int h) {
   // This function ensures that hashCodes that differ only by
   // constant multiples at each bit position have a bounded
   // number of collisions (approximately 8 at default load factor).
   h ^= (h >>> 20) ^ (h >>> 12);
   return h ^ (h >>> 7) ^ (h >>> 4);
}
```

<p>made perfect sense to me in about as long as would take to dictate the code aloud.  The events described in <code>bitCount</code> are immediately clear, but it takes a minute to work out why it actually counts bits.  Comments would be great, though, and would make understanding what the code does only slightly harder than the hash problem.</p>

<p>It's important to make the distinction between reading and understanding the code.  I can interpret the <code>bitCount</code> code, and read off what it does, but proving why it works or even that it works would take a minute.  There's a difference between being able to read code smoothly and being able to grok why the code is the way it is.  Some algorithms are simply hard.  The <em>what</em> of the <code>hash</code> code made sense, but the comment explained <em>why</em> the what was being done.  Don't be discouraged if a function using bitwise operators is hard to understand, they're often used to do tricky mathematical stuff which would be hard no matter the format.</p>

<h2>An analogy</h2>

<p>I'm used to this stuff.  One subject that I'm not used to is <strong>regex.</strong>  I deal with them occasionally on build scripts, but never in daily development work.</p>

<p>I know how to use the following elements of a regex: </p>

<ul>
<li><code>[]</code> character classes</li>
<li>The <code>*</code>, <code>.</code>, and <code>+</code> wildcards</li>
<li>The start of string <code>^</code> and end of string <code>$</code></li>
<li>The \d, \w, and \s character classes</li>
<li>The /g flag</li>
</ul>

<p>This is enough to craft simple queries, and many of the queries I see don't stray far from this.</p>

<p>Anything not on this list, I reach for a cheat sheet. Anything, that is, except <code>{}</code> and <code>()</code> - The cheat sheet won't be enough.  I know just enough about these guys to know that I'm going to need a whiteboard, a reference manual, and maybe a coworker. You can pack some crazy algorithms into a few short lines of regex.</p>

<p>To design a regex which requires or suggests anything that's not in my list of known elements, I'm going to list out all the classes of inputs that I expect to recognize and put them in a test suite.  I'm going to craft the regex slowly and incrementally, with lots of intermittent steps, and commit these steps to source control and/or leave them in a comment so I can understand what was supposed to happen later when it breaks.  If it's in production code, I'm going to make sure that it gets reviewed by someone with more experience.</p>

<p>Is this where you're at with bitwise operators?</p>

<h2>So you want to be well rounded?</h2>

<p>In my estimation, if you're able to interpret what code like this does by pulling out a piece of paper or going to the whiteboard and running through the operations manually, you qualify as well-rounded.  To qualify as a good well-rounded programmer in the area of bitwise operations you should be able to do four things: </p>

<ol>
<li><p><strong>Be able to read and write common operations fluidly</strong><br>
For an applications programmer, common operations with bitwise operators include the basic operators of <code>|</code> and <code>&</code> to set and clear flags.  This should be easy.  You should be able to read and write stuff like </p>

```open('file', O_WRONLY | O_APPEND | O_CREAT );
// Use an OR operator ^ here and ^ here to set multiple flags
```

without slowing down (assuming you know what the flags mean).

Be able to read more complex operations with some work

Counting bits really fast in O(log(n)) time without branches, ensuring that the number of collisions in hashCodes can differ by a bounded amount, and parsing email addresses, phone numbers, or HTML with a regex are hard problems.  It's reasonable for anyone who's not an expert in these areas to reach for the whiteboard, it's unreasonable to be unable to begin working to understand.

Be able to write some complex algorithms with a lot of work

If you're not an expert, you shouldn't expect to be able to do complex and difficult stuff.  However, a good programmer should be able to get it done by working at it continuously.  Do this enough, and you'll soon be an expert :)

Body:
How hard is are bitwise operators to interpret?

I program embedded systems.  I've practiced this stuff a lot.  Your linked question about hash maps with the code

static int hash(int h) {
   // This function ensures that hashCodes that differ only by
   // constant multiples at each bit position have a bounded
   // number of collisions (approximately 8 at default load factor).
   h ^= (h >>> 20) ^ (h >>> 12);
   return h ^ (h >>> 7) ^ (h >>> 4);
}

made perfect sense to me in about as long as would take to dictate the code aloud.  The events described in bitCount are immediately clear, but it takes a minute to work out why it actually counts bits.  Comments would be great, though, and would make understanding what the code does only slightly harder than the hash problem.

It's important to make the distinction between reading and understanding the code.  I can interpret the bitCount code, and read off what it does, but proving why it works or even that it works would take a minute.  There's a difference between being able to read code smoothly and being able to grok why the code is the way it is.  Some algorithms are simply hard.  The what of the hash code made sense, but the comment explained why the what was being done.  Don't be discouraged if a function using bitwise operators is hard to understand, they're often used to do tricky mathematical stuff which would be hard no matter the format.

An analogy

I'm used to this stuff.  One subject that I'm not used to is regex.  I deal with them occasionally on build scripts, but never in daily development work.

I know how to use the following elements of a regex:

[] character classes

The *, ., and + wildcards

The start of string ^ and end of string $

The \d, \w, and \s character classes

The /g flag

This is enough to craft simple queries, and many of the queries I see don't stray far from this.

Anything not on this list, I reach for a cheat sheet. Anything, that is, except {} and () - The cheat sheet won't be enough.  I know just enough about these guys to know that I'm going to need a whiteboard, a reference manual, and maybe a coworker. You can pack some crazy algorithms into a few short lines of regex.

To design a regex which requires or suggests anything that's not in my list of known elements, I'm going to list out all the classes of inputs that I expect to recognize and put them in a test suite.  I'm going to craft the regex slowly and incrementally, with lots of intermittent steps, and commit these steps to source control and/or leave them in a comment so I can understand what was supposed to happen later when it breaks.  If it's in production code, I'm going to make sure that it gets reviewed by someone with more experience.

Is this where you're at with bitwise operators?

So you want to be well rounded?

In my estimation, if you're able to interpret what code like this does by pulling out a piece of paper or going to the whiteboard and running through the operations manually, you qualify as well-rounded.  To qualify as a good well-rounded programmer in the area of bitwise operations you should be able to do four things:

Be able to read and write common operations fluidly

For an applications programmer, common operations with bitwise operators include the basic operators of | and & to set and clear flags.  This should be easy.  You should be able to read and write stuff like

open('file', O_WRONLY | O_APPEND | O_CREAT );
// Use an OR operator ^ here and ^ here to set multiple flags

without slowing down (assuming you know what the flags mean).

Be able to read more complex operations with some work

Counting bits really fast in O(log(n)) time without branches, ensuring that the number of collisions in hashCodes can differ by a bounded amount, and parsing email addresses, phone numbers, or HTML with a regex are hard problems.  It's reasonable for anyone who's not an expert in these areas to reach for the whiteboard, it's unreasonable to be unable to begin working to understand.

Be able to write some complex algorithms with a lot of work

If you're not an expert, you shouldn't expect to be able to do complex and difficult stuff.  However, a good programmer should be able to get it done by working at it continuously.  Do this enough, and you'll soon be an expert :)


答: These other answers are great but I'll throw in my $0.02.  I have moved from a junior developer at my current company through the ranks to senior developer and then team lead and now architect.  It took several years.  Whenever I was given a promotion it was because I was already doing aspects of the job, and my management was just recognizing that and giving me the appropriate title.  So my advice is not to wait to be told you are a technical lead or a manager.  Just start taking on responsibilities that people in those roles have.  After a few months or a year you will find that you are basically doing the job you're targeting, and you can point that out to your management if they haven't noticed it.


答:
Reliability factors become amazingly important when you're dealing with people's money.  If Twitter loses a tweet, it's not that big a deal; if you charge someone's credit card but lose their order, somebody in your organization is going to get an earful from an angry customer.  So two things:  1.  You don't want that to happen in the first place, but 2. it will happen eventually no matter how careful you are, so you want to put a LOT of energy into the kind of logging and tracing mechanisms that will help you go back and find the "lost" order and correct the situation.

The absolute worst thing is to have, for example, a credit-card charge, but NO record at all of what it's for, or who it belongs to, etc.

For financial stuff,  you really do need to think through even the seemingly super-improbable scenarios and plan for how to handle them:  "We charged the credit card, but the database server is down before we can update the corresponding record."  OK, what now?  Void the charge?  Log the transaction to a file so a human can fix it later?  Ok, what if the disk is full and you can't write to the file?  Etc., etc.

Title: What special considerations are needed when designing databases to hold financial records?

Body:
I hope this question isn't too broad. In the future I may need to add some accounting and financial-tracking systems to some applications (mostly web-based applications, but my questions pertains to desktop apps as well).

Now, creating a simple record of financial transactions is theoretically easy. One database table with a few columns could do the job. Even MS Access, Excel, or even just a plain ASCII text file could be used to store transaction dates, account IDs, and dollar amounts. However, I feel that even a frequently backed-up SQL table with transactional integrity might not be robust enough for serious financial tracking.

I hear terms like "double-entry accounting", and I get the feeling that most financial tracking apps (for example, Mint.com, or GnuCash) have a much more complicated data structure or process in place to make double-sure that everything adds up perfectly, exactly as it should, and that no data is ever lost or corrupted.

My question is: When designing an app to track financial transactions, what special design considerations should be made? It seems like there could be so many potential issues... issues with rounding precision, parity checks, some kind of audit process, special backups, security/encryption, extra ways to protect data in the case of a crash mid data-entry....  I don't really know what I should be asking specifically, but I get the feeling that the programming industry has a set of best practices I know nothing about. What are they?

Edit:

It looks like I opened a bigger can of worms than I expected. To clarify, I'm thinking specifically of two types of apps:

"Check registry"-type apps like GnuCash or Quicken that maintain a record of an individuals transactions for their own use.

Apps that track invoicing/credit/or "points" for vendors and customers that deal with a company.

I probably will not be doing any direct banking or (AFAIK) anything that has a ton of finance-related government regulations attached to it.


答:
Given that SQL Server can covert to XML simply by using "AS XML", you'd think they would have added "AS JSON" at least in the Denali release. We took a stab at creating a .NET class to give us that functionality on the database, so we could get JSON back instead of a query object. No matter what was tried, the conversion was unbelievably slow.

Check out this SO post. It shows how to convert your record set into JSON using .NET.


问:
What is a proper term to describe a server running source control, bug tracking and CI tools?
I'm looking for a 'term' that describes holistically the set of various software development tools/services that most developers use on a day to day basis. While each tool by itself has a specific purpose and can be described, is there a plural term when they are grouped together and running as a holistic service.

If a person said a server was a production test box, I'd expect it to be running the application that company are writing. If a person said box A is the office ware server, I'd know to expect email/communication related services.

答:
I've been using the term "build environment" or "build server" which covers our:

SVN Server

Issue tracking

CCNet

Test case management

Development wiki

etc

It was the best term we could come up with at the time.


问:
How do I do TDD when expected behaviour is to be changed?
I've been doing TDD with a project I'm working on, and I have quite a large number of tests.  I have quite a few automated tests around restrictions enforced in code, making sure things that shouldn't be allowed aren't allowed.  Now I've been told that due to changes in our licensing model, some of those restrictions need to be removed.

Since I've done the entire project using TDD, I'm not sure how to make a change like this also using the TDD mindset.

So, my question is: Do I make the back end changes and see what tests break, or do I try to find the tests that enforce the behaviour, and change those first?

My concern is that if there are operations A, B, C and D where a check is done to disallow the behaviour, and I have equivalent tests TestA, TestB, TestC, and TestD (possibly in different places) no matter which half I change first, I may miss one or two spots and end up with incorrect behaviour, but still have all the tests pass (e.g. what if I miss TestD?)

答: With TDD, by definition you'd need to change the tests to reflect the new behaviors, and then modify the code until all of the tests pass. However, depending on the size of your code base and the amount of time that you (and your team) have been allotted to complete this transition, there may not be enough time to do it that way. You may have to pick a few key sections, update the tests and then the code, and push the changes in gradually.</p>


问:
What do you think of "Planning Poker"?
Planning Poker

Summary, in case you don't want to read the wiki article:

Get a list of tasks you want to do for the upcoming iteration

For each task:

2.1 Discuss with the group what it entails

2.2 Everyone writes down / selects an estimation of how much effort is required for the task

2.3 Everyone reveals their estimation

2.4 The highest and lowest outliers explain their reasoning

2.5 Repeat until a consensus is reached

Usually something similar to numbers from the Fibonacci sequence like 0, ½, 1, 2, 3, 5, 8, 13, 20, 40, 100 are the allowed values, so you don't get long arguments over close values like 23 vs 27.

Further, the numbers represent a unit-less value of effort, whose value is determined by a baseline task that everyone agrees equals about a 1, and all else is relative to that.

Ultimately, the goal is to get a good feel for a given team's "velocity", which is the number of these points that can be completed in a given iteration.  With that, it's possible to make reasonably accurate estimates of how long any given feature will take.

We did this at iteration planning meetings at one company I worked at, and I thought it was one of the few good things about that particular company.  So, what I'm wondering is, has anyone used this?  Do you think it's a useful tool for estimation?  Does it work in all situations, or does it lend itself to certain teams, projects, etc?

答: I like Pavel's points and would like to add that it really helps junior developers or noobs learn a lot faster. They can't just sit back and let the senior developers rule. Their vote counts just as much and if they really focus on making their estimates accurate they will learn a lot from the senior developers. </p>

Title: What do you think of "Planning Poker"?


答:
Some of the considerations I see are that you have to account for internal controls. This means all access for actions against tables(Insert/delete/update) must be through stored procs (and no dynamic SQl) so that no tables allow write or delete rights directly on the table to anyone except a system admin. You also have to account for internal controls that do not allow someone to create a new company and then charge items to that company (a route for fraud). Actions like that will always require people in two different roles to approve. Also checks should not be cut unless one person enters data and another approves the expense.

All tables should have triggers that create audit records. You are looking to prevent fraud and if it happens to determine exactly who took the actions when.

In financial applications, you are much more concerned with a lot of back end processes that are never seen by the User Interface. Your first concern is to prevent fraud and thus many checks that no one is aware of are made in the backend.

I would not tackle a financial application of any kind without reading the GAAP (in the US, other countries have their own accounting standards) thoroughly and having a CPA as a consultant as incorrect accounting practices can lead to jail time. This is a highly technical field and someone without the requisite knowdlge has no business attempting to create software in this area.


答:
Explanation by example. Data are sequences of bits. Lets count the bits on the byte 01001101 having the following operations available:
1. We can check the value of the last bit.
2. We can shift the sequence.

01001101 -> last byte is 1, total=1. shifts

10100110 -> last byte is 0, total=1. shifts

01010011 -> last byte is 1, total=2. shifts

10101001 -> last byte is 1, total=3. shifts

11010100 -> last byte is 0, total=3. shifts

01101010 -> last byte is 0, total=3. shifts

00110101 -> last byte is 1, total=4. shifts

10011010 -> last byte is 0, total=4. shifts

Our answer: 4.

This was not hard, was it? The big deal with bitwise operations is that there are limited things we can do. We cant access a bit directly. But we can, for instance, know the value of the last bit comparing it to the MASK 00000001 and we can make every bit be the last one with shift operations. Of course, the resultant algorithm will look scary for those not used to. Nothing to do with intelligence.


问:
Which DVCS (git or hg) is easier for programming students?
A bit of context: I'm in 3rd year of college. students are divided into teams of 4. Almost everyone will be working under windows (except a few like me who are on linux). As part of the school curriculum, we will soon start working on a project for a real client, but me and another team are wondering which way would be best for sharing our code with each other.

I've been working part-time for 3 years and have had plenty of experience using both git and mercurial on different projects, so I don't have any problems using one system or the other.  However, none of my teammates have ever used a version control system before. There's also another team who've tried using SVN but have had major problems and would prefer trying out something else, so they've asked for my opinion.

My thoughts : I've heard that mercurial + TortoiseHg has a better integration under windows, but I'm wondering if the concept of anonymous heads might confuse them even If I explain them. On the other hand, I find that git branches are easier for a beginner to understand (clear seperation of work for each programmer) but doesn't work as well under windows.

答:
If you're interested in a third option, I'd suggest fossil. I find the ability to throw up a temp web server to share code works great in small projects. Fossil is just an executable, so you could put it and your source into a thumb drive, and use it from any university computer.

Use fossil ui to start a temp web server wherever you are to have your fellow students sync up with you. It also gives you a ticket system, wiki, and easy to use web interface for changing branches and tagging commits.

Just make sure they read the quickstart guide, and/or the book. Finally, there is a project called winFossil to give them a friendlier user interface than the web ui.


问:
hiring a web designer: design task
I need to hire a web designer. How do I test his creativity and skills before I hire him. Ideally I'd like to give him a fairly open-ended task i.e. I give him a problem statement and ask him to design a PSD file.

Any suggestions on the problem statement I might give him? Also, is there a better way to hire /test a web designer?

答:
I just asked a designer sat across from me - he said he wouldn't perform the task but rely on his portfolio.

Are you testing the potential designer's competency with his/her tools or want a feel for their style/output/approach? Examples of previous work is a better way, talk to a past client or two, and listen for what feedback/ideas they have when talking to you. They might mock up one or two (roughly, not finished articles).

OwnerDisplayName: Gaurav Sharma

Title: hiring a web designer: design task


答:
My personal preference is for git.

However, as some people will be using windows and the superb hginit tutorial exists, I'd recommend teaching them mercurial.

Title: Which DVCS (git or hg) is easier for programming students?

Body:
A bit of context: I'm in 3rd year of college. students are divided into teams of 4. Almost everyone will be working under windows (except a few like me who are on linux). As part of the school curriculum, we will soon start working on a project for a real client, but me and another team are wondering which way would be best for sharing our code with each other.

I've been working part-time for 3 years and have had plenty of experience using both git and mercurial on different projects, so I don't have any problems using one system or the other.  However, none of my teammates have ever used a version control system before. There's also another team who've tried using SVN but have had major problems and would prefer trying out something else, so they've asked for my opinion.

My thoughts : I've heard that mercurial + TortoiseHg has a better integration under windows, but I'm wondering if the concept of anonymous heads might confuse them even If I explain them. On the other hand, I find that git branches are easier for a beginner to understand (clear seperation of work for each programmer) but doesn't work as well under windows.


答:
I've found that the TortoiseHg UI is a great experience on Windows.  When experimenting with Git in the past, I ended up going to the command line instead.  To your average user, a good UI is much more approachable than a command line.  So, I'd suggest using Mercurial.  (It includes a nice branch graph in the workbench window, too.  It should clear up any of the basic branching difficulties.)

Once they understand things from the UI perspective, they may end up going to the command line to script or do manual operations - but they don't need to.