Software developer’s worst enemy

Coding Horror has an insightful article on the software developer’s worst enemy.

[…] the real problem isn’t the code. The code, like a newborn babe, is blameless and innocent the minute it is written into the world. Code isn’t our enemy. You want to see the real enemy? Go look in the mirror. There’s your problem, right there.

As a software developer, you are your own worst enemy. The sooner you realize that, the better off you’ll be.

I know you have the best of intentions. We all do. We’re software developers; we love writing code. It’s what we do. We never met a problem we couldn’t solve with some duct tape, a jury-rigged coat hanger, and a pinch of code. But Wil Shipley argues that we should rein in our natural tendencies to write lots of code
[…]

There are quite a few things which seem obvious, that you can’t really disagree with, but which I also didn’t define or form on my own for some reason.

What is a week?

Today morning I had a brief conversation with a coworker. As many office works do on Wednesday, and not only on Wednesday, we were dreaming of the upcoming weekend. Partially, as a joke, we said that it would be nice to have an extra day in a week that nobody else would know about. We could then rest and relax in the middle of the week without anyone noticing our absence.

That reminded me of the system that I’ve built a few years ago. It had to do with schedule generation for a bunch of people who were working shifts. The rules of who can take which shifts were constantly changing. And so, in order to build the most flexible system that I could think of, I implemented one which had a variable number of days per week. You could easily build a week of just three days or eight or ten. On top of that, days could be easily rearranged in order. That was a fun setup, but eventually it proved very useful. I left the company many years ago, but I hear they still use the system with just a few extra tweaks.

Once I remembered that system, it got me thinking more about the definition of the week. Which brought me to the history of how did we come to have a 7 day week. The best resource for things like that is, of course, Wikipedia. Surprisingly, the page is not very long. But even as it is, it still mentions weeks used in different societies at different times. Have a look at it to learn about 3-, 4-, 5-, 6-, 8-, 9-, and even 10-day weeks. It’s quite fun.

Given that time is very abstract, I find it interesting how tightly we hold on to a 7-day week standard.

Day in brief – 2011-10-19

  • Shared: Google Switching to SSL By Default For Logged-In Users http://t.co/4gOK9T2S #
  • Shared: Samsung's Galaxy Nexus gets official: Android 4.0, 4.65-inch HD Super AMOLED display (video) http://t.co/MUbtqmIr #
  • Shared: Incremental Updates http://t.co/5f87NITx #
  • New note : GitLab – GitHub for your self-hosted server http://t.co/eqNWf7jj #
  • I finally bought myself a wireless mouse. One less cable to plug and unplug few times a day. Next in line are wireless headphones. #
  • #ifyoudontgivehead you are probably bad at maths :) #
  • I favorited a @YouTube video http://t.co/KW3FSST3 Foursquare with Corcoran Group #
  • First day at work after a week's beak. It's tough. I want to go back to my vacations. (@ FXCC) http://t.co/GOfoO5Uc #
  • I favorited a @YouTube video http://t.co/7RbAGfu0 Quantum Levitation #
  • I favorited a @YouTube video http://t.co/C0CcSezc QuantumLevitation #
  • The only advantage of a wired mouse over a wireless one is that it doesn't fall off the table when accidentally pushed. It hangs itself. #
  • I find plastic packaging annoying when shopping for a mouse. You can't get a feel of the texture, sound of a click or scroll wheel. #FAIL #
  • Like Apple Siri but for Android. Pretty cool. Playing all day with it. http://t.co/LPcXlzY8 #
  • Enjoying the company of my mother. (@ Chester's) http://t.co/BtBpZ6h8 #

Day in brief – 2011-10-18

  • Massive thunderstorm in #limassol #cyprus . Massive! #
  • Trying out Miso – a social network for TV and movie fans. http://t.co/khXtyxOC #
  • I am watching How I Met Your Mother, Field Trip (S07E05). http://t.co/SlQyMSL3 #
  • I was just awarded the "TV Newbie" badge at http://t.co/zUL4fPGg #
  • I've just learned about a very useful PHP function: array_unshift() http://t.co/FMOkn94w #
  • Только что узнал, что мама Артемия Лебедева – Толстая, Татьяна Никитична — Википедия http://t.co/DpV9ZaP9 . Это многое объясняет. :) #
  • Looking for more TV to watch. Hopefully this is it. (watching Bored to Death, Stockholm Syndrome S01E01) http://t.co/8PJkJ4sh #
  • @stepanov ага, это знал. Прочитал, когда Mean Machine с ним посмотрел. :-) #
  • I'm at The Ship Inn (1 28 Oktovriou, Limassol) http://t.co/c27fE987 #

CakePHP 2.0 released!

I’ve been a bit all over the place these last few days, but I knew that this was coming shortly – CakePHP team released the new and much improved version 2.0 a couple of days ago. There are a lot of changes. And I do mean a lot. Here are some of my favorite:

  • PHP5 support. CakePHP was working with PHP before, of course. But in this release, support for PHP4 was dropped and all code has been updated to utilize PHP5 goodies.
  • Lazy class loading. Previous versions of CakePHP could easily get slow with a lot of models. There were solutions like Containable behavior and others. But it was annoying never the less. CakePHP 2.0 is much improved in this regard. It only loads things that are actually needed and used. That is a huge performance improvement.
  • Improved Console. The new Console is so much better that I’m even considering using CakePHP 2.0 for some of my non-web-based projects. It’s that good!
  • PHPUnit. Previous versions of CakePHP were using SimpleTest framework for unit tests. CakePHP 2.0 switched to the de facto standard PHPUnit. Tests are now easier to write. And integrating CakePHP projects with other Quality Assurance tools should be a breeze.

There are, of course, more changes. These are just the top few that I am particularly glad about.

Also, CakePHP 2.0 release is special to me. It’s been a long while since I participated in the development process of an Open Source project. I usually just report bugs and provide help via forums and blog posts. I did more than that with CakePHP 2.0. I actually wrote a couple of patches that were accepted and merged into this release. They were no rocket science, but a contribution nonetheless.

If you haven’t tried CakePHP before, now is the perfect time to do so. If you have tried older CakePHP versions, you’ll find this one to be much of an improvement. If you have tried it already, please share your thoughts in the comments. Let me know what you think of it.