Most productive with 8+ hours of sleep…
by HidekiAI on Sep.16, 2009, under Technology Opinions
I just saw a very interesting survey at www.CodeProject.com. It was/is interesting to me because I used to keep track of daily logs and journals to determine why I felt so unproductive (to me, as a programmer, productivity is based on getting my tasks done on time).
Here’s the snapshot of the survey:
When do you do your best coding?
Survey period: 31 Aug 2009 to 7 Sep 2009
Are you a night owl? An early riser? Or does 9-5 work for you?
Choose the periods in which you feel you code best.
| Option | Votes |
% |
||
| 6am – 9am |
284 |
18.39 |
||
| 9am – 12pm |
615 |
39.83 |
||
| 12pm – 3pm |
256 |
16.58 |
||
| 3pm – 6pm |
381 |
24.68 |
||
| 6pm – 9pm |
350 |
22.67 |
||
| 9pm – 12am |
430 |
27.85 |
||
| 12am – 3am |
302 |
19.56 |
||
| 3am – 6am |
118 |
7.64 |
||
| Responses |
1544 |
|||
| This is a multiple choice question. Totals may not add up to 100% | ||||
From: http://www.codeproject.com/script/Surveys/Results.aspx?srvid=953
Notice that the highest productivity for most are at 0900-1200 hrs. When I did contracting for a while working from home, I realized that when I woke up at 0700 hrs and began straight to work, I was able to solve problems and issues much more efficiently and quicker in the mornings.
So based on that pattern, I began to make sure that any issues which involved more analytical and thinking process were reserved for the mornings or put off until the next day if needed, and anything that was more mechanical were scheduled after 1200 (noon).
I dislike mornings, I prefer to sleep in until 0800 or later on weekends. So I’m not really a morning person, or to say that I am productive in the early mornings. I believe it is more about having a good rest and stepping away from the problems for period of time is what makes me productive.
This is why I never pull an all-nighters (if I can help it) because if I cannot solve the problems due to my “big muscle” (our brain) being tired, it’s just unproductive and inefficient in the long run.
I’ve made dumb coding-mistakes in the past due to lack of sleep. The one that I remember most well and use as my example is the one about multiplying an integer by 8 by using a loop for it (in Assembly Language, I think it was on Zilog Z80). Yes, if I was wide awake (or even half awake), I would have just left-shifted the register (the integer value) by 3 and be done with it… The next day when I saw that code, I was in horror…
Unfortunately, I did not learn any lesson back then, I was young and I always assumed putting more hours into it in single sittings meant working hard at it. I did not realize that it was important to work smarter, not harder…
Related posts
FireHOL + Ubuntu + gpconv|pwconv
by HidekiAI on Aug.30, 2009, under Technology Opinions
Have you ever ran into an issue like this:
-------------------------------------------------------------------------------- ERROR : # 1. WHAT : A runtime command failed to execute (returned error 2). SOURCE : line 16 of /etc/firehol/firehol.conf COMMAND : /sbin/iptables -t filter -A in_interface1_syslog_s7 -p udp --sport syslog --dport 514 -m state --state NEW\,ESTABLISHED -j ACCEPT OUTPUT : iptables v1.3.8: invalid port/service `syslog' specified Try `iptables -h' or 'iptables --help' for more information.
You’d get similar errors for “ftp”, “ftp-data”, and I’d imagine other random ones. You probably won’t see it if you have “START_FIREHOL=YES” not set (or commented out) in your firehol.conf file either…
Contrary to the beliefs that it is a problem with FireHOL or older bash, it’s actually (at least for me) a permission issue…
A simple test might be to do “whoami” and you might see this:
root@localhost ~ # whoami whoami: cannot find name for user ID 0
I seem to get this whenever I run nscd daemon and have my ldap configured incorrectly.
In any case, try the following:
root@localhost ~ # grpconv root@localhost ~ # pwconv
Now try restarting FireHOL again (or try “whoami”). If that works, a possible “temporary” fix until you resolve it is to run a cron hourly of grpconv & pwconv (and of course disable other services such as nscd – at least for me).
Related posts
Visual Studio .NET 2005 + I.C.E. (Internal Compiler Error)
by HidekiAI on Aug.22, 2009, under Game Development
A while back, I wrote a BLog about Visual Studio 2005 and C# not being about to generate DLL Assembly with invalid user (at “http://www.codemonkeyninja.com/blog/?p=320″) – by the way, if you still have this problems after you regedt32 for wrong users, verify and make sure you can succeed if you right-click on Visual Studio and “Run as” Administrator, and if you succeed, this is the problem you are having.
Anyways, at work, I have been using Visual Studio .NET 2005, and off-and-on I would get an “Internal Compiler Error” via cl.exe and I’d make sure that I have the latest service packs installed for Visual Studio.
Just recently, I spent about 2 hrs trying to compile a third party source code (but that’s irrelevant of what I am compiling since this issue has happened in other sources) and I ran into an old MSDN knowledge-base bug where they have suggested disabling “Minimal Rebuild” (under “C/C++” -> “Code Generation” -> “Enable Minimal Rebuild”) to see if I.C.E. would go away.
By the way, this is for Native C++, but I usually turn it off for Mixed and /CLR based as well, just in case…
As mentioned, I do have the latest service packs for Visual Studio, and according to MSDN, this bug has been fixed.
Yet, just by disabling all the projects (for all the $(ConfigurationName) – select “All Configuration”) of Minimal Rebuild, the problem goes away. And yes, I’ve rebooted at least once, tried compiling it from both IDE and via command-line, called cl.exe from MSBuild, devenv.com, and even devenv.exe. Tried clean and rebuild, as well as “del /s /f /q *.pdb *.pch”, etc, etc.
I’ve never trusted minimal rebuilds, incremental linking, and even .PCH sometimes can give me griefs… These mechanisms are supposed to save me time, yet it ends up sometimes taking away the precious dev-time and is hardest to figure out…
P/S: Make sure to at least delete all your “*.pch” after disabling “Minimal Rebuild”.
LinkedIn profile
Recent Comments