/dev/null

Static is evil.

August 24, 2010

FrOSCon not relevant?

Tags: , — 22:49

The hobby experts on Wikipedia say that FrOSCon is not relevant:

Keine Relevanz [...] ersichtlich. Die Fotos lassen auf eine eher familiäre Veranstaltung schliessen.

Well, I havent looked at it this way so far. FrOSCon is not exactly a small “family event”… the discussion was a good laugh before going to bed :D

Money lost during wire transfer

Tags: — 10:35

Isn’t it funny? I couple of hours ago I write about what could happen IF a bank uses a NoSQL database like Cassandra.

I just got an email from my customer, saying that my money got lost during the wire transfer process at the clearing house. What a coincidence! Did that ever happen to you? I never heard about this before. At least the bank will refund the amount, which is really generous xD

Cassandra

Tags: , — 03:36

Just one short note, before I go to bed.

At FrOSCon I saw the talk about the NoSQL database Cassandra. The guy was pretty convincing. He also said, SQL joins are slow and cumbersome for some use cases (his example was Twitter). Then his slides showed how nicely Cassandra can provide the same data as some kind of materialized view that is constantly updated after data changes. And how secure the storage is with multiple backups and smart fail-safe mechanisms.

I was impressed.

On the other hand, I am skeptical towards the promisses of the NoSQL advocates. And I normally don’t like any software that runs on Java (see Eclipse), but that’s another story. That kind of stuff sounds nice on the paper, but fails randomly in the real world. Probably because it is too smart and advanced.

Directly after I came back home from FrOSCon, I noticed that certain feeds (like replies to me) show very recent tweets only. Nothing older than about 4 days. The search results page says: “Older tweets are temporarily unavailable.” Oh, really?

Imagine you would use this kind of technology to run a bank: “Sorry, we lost your account transactions. We are sure you had at least 10 dollars on your account, so that is all you can get today. Maybe we find the rest later.”

Hopefully they can restore their fail-safe materialized views. Somebody should convince police and government to use NoSQL databases: “Sorry, we lost your criminal record of the last 20 years. You are free to go.”

I know, most NoSQL databases are not made for banking or even business applications. Friends – for example – are not that important/critical and that’s probably why Facebook, the other big Cassandra showcase project, does not really know how many I have. The number changes frequently by ± 1.

August 20, 2010

Notification Free PHP Coding

Tags: — 16:23

This is a reply to http://100days.de/serendipity/archives/50-Notification-Free-PHP-Coding.html. Gaylord Aulke’s opinions are normally quite valuable. There are a couple of arguments (just read the comments) in both directions and to be fair, Gaylord also said, that his opinion is different for frameworks and libraries.

Even though I tend look into PHP notifications (some code produces so much of them, that you can only ignore them), I wasn’t really sure what my final position on Notification Free PHP Coding is and I was not too strict about it.

That changed today.

While demonstrating my reporting frontent for PHPUnit to the customer this month, I had to find out that it’s JUnit/XML logger sometimes produces broken XML files: You can get a “PCDATA invalid Char” exception when loading it with DOMDocument::load(). Sebastian Bergmann encouraged me to send a pull request on github, which is nice. Except that I never contributed to PHPUnit before. Nor did I actively use github. Like Lars Jankowfsky I tend to stay with SVN, when possible (that’s probably worth another blog post).

Anyways: It was easy to fix the bug (actually, it turned out to be more complex) and after reading a couple of git manuals, I found out how to commit, push and send a pull request. The only thing I didn’t notice is that I used the constant ENT_QUOT (undefined) instead of ENT_QUOTES (defined) as an argument to htmlspecialchars() for some reason – this is why I recommend to focus on each line of code to other people…

htmlspecialchars(self::convertToUtf8($string), ENT_QUOT, ‘UTF-8′)

Not a big thing, if I would have seen the PHP notice!

Notice: Use of undefined constant ENT_QUOT – assumed ‘ENT_QUOT’

It was not possible to see it, not because I did not look at the error messages or the test results, but because the default config for PHP on Ubuntu is error_reporting = E_ALL & ~E_NOTICE. To use an undefined constant is just plain wrong and leads to an undefined state of the software – it must be noticed. Also, whenever there are too much notices, you won’t be able to spot it. Therefore the only way to avoid it is to produce notification free code. I don’t want something embarrassing like this ever happen to me again.

Lesson learned.

The Perfect Development Environment

Tags: — 08:49

This is a reply to http://thinkvitamin.com/dev/the-perfect-development-environment/

Work Setting

I prefer to be alone, with no one walking around, having conversations on the phone or asking questions. And yes, barking dogs are bad while you try to focus on source code^^

If people can not keep their mouth shut, loud music helps a lot. Use the headphones, whenever other people are around.

If you do an on-site consulting job, better not keep the client from asking questions though: This is what he (or she) pays for! Same is true, if you happen to be in the role of a lead developer. There is no way to hide behind your screen(s). Not matter how many you have.

Desk & Chair

I prefer a simple chair. All the fancy furniture didn’t work for me:

And a desk made of real wood, not that crappy and cheap IKEA stuff made of plastic and particle board. No dinning room table, those are usually too high (76cm). Remember that the keyboard/notebook has a certain height too. The perfect desk is 73cm high. I agree it should be simple, without “cubby holes, drawers and cord hiders”.

Monitor Setup

As a freelance developer, I need a lot of space on my desk to draw diagrams and sign my invoices. Or just to put the Amazon Kindle. It’s a good replacement for the obligatory PDF readers or word processors that are open in the background and hold the customer requirements.

There are some scientific results that suggest that any screen larger than 17 inch will decrease productivity. Not sure about that. But certainly I don’t want to move my head all the time to collect information from different screens. I was able to work on a JavaScript project with more than 50k lines of code on a 10 inch netbook without problems.

Mouse & Keyboard

I normally have to use the keyboard built into my ThinkPad, which does it’s job quite well. The best keyboard I ever had was a Cherry G80-3000 with MX gold crosspoint technology and without Windows keys. Those times are gone forever. Everything has to be flat in this century and you can get used to it.

As a PHP/JS/C/Perl developer, you will be happy with a US layout. As a consultant not living in the States, you might want to use a local layout, so that you can easily access non-ascii chars while writing your important business documents.

The best mouse I found so far is the Logitech Basic mouse and it is very cheap at the same time. It is available in gray and black. Perfect.

Minimizing Distractions

I usually outperform other developers, even those with 3 screens, not because I am cool, but because I don’t use Windows when not working on some Office document. This reduces the times when I have to explain my customer or co-worker that “it does not work and I don’t know why”. Also it’s easy to get rid of 3D effects, playful window borders and desktop widgets that distract you. Skype looks less like a computer game too, but works equally well. The UMTS modem works every time, not not just every second time (if it fails, you will see a meaningful error message). There is no need to think a lot about which applications to use and there is a standard way for pretty much everything. Last but not least most servers run Unix too, so you don’t experience those strange “file not found” problems after the code was deployed to the production environment. Windows isn’t case sensitive.

System Shortcuts & Project Management

You normally have 3 or 4 windows open that matter:

  1. the console (to run the unit tests and do svn/git commits)
  2. the text editor (gedit)
  3. the Web browser (2 tabs, one with the app and one with google open to search for documentation)
  4. and maybe GIMP (if you work on graphics too) or Skype for talking with other people about the project

Remember that we outsourced requirements documents to the Kindle or real paper where you can scratch around.

Those windows fit into any task bar, even on small screens. You don’t want to see your desktop wallpaper, while you’re working. Maximize your windows and use the full space available (Mac users will complain now, as far as I remember).

Tortoise SVN is crap, but the best you can get on Windows, I guess. Better use the command line applications on Unix. If you do Open Source or want to be cool, you use git and tell all your friends that svn is bad.

IDE & Other Programs

Most editors fail when working on large projects. Eclipse (also known as Aptana, Zend Studio, PDT) used to have a CSS editor that was so slow, that it took several minutes to open large CSS files. The memory management did not work really well – eventually I found a garbage collection plugin, which added small trash button in the bottom right corner that I had to press every time, the memory usage went to high (WTF!?). Just today I enabled the option “insert spaces for tabs”, pressed the tab key and it inserted a… tab. Crap.

Besides those annoyances, the Eclipse file/folder tree does not update automatically and the SVN plugin (there are many with different bugs to chose from, right?) seems as waste of time compared to the straight forward usage of the default command line tools.

Therefore my recommendation is to use gedit, the default editor that comes with Gnome. It’s only downside is that it can not save files on SMB shares (VirtualBox shared folders) because of a bug, and that really is the only reason for me to use Aptana from time to time.

gedit’s major features:

  • It is stable
  • You see the character on the screen, directly after you pressed a key (no delay)
  • You write nice looking code that is readable, even without additional tools, filters and beautifiers
  • The file/folder tree updates automatically
  • Syntax highlighting for JavaScript, PHP and other languages
  • Automatic indentation
  • UTF-8 is default – you never accidentally break the encoding again and get hurt by your co-workers for this
  • Low memory usage
  • The save button works every time (not true for Eclipse, as I had to find out painfully)
  • It doesn’t occupy a lot of the valuable space on the screen

And yes, it can use plug-ins and you can write your own, if you feel something is missing. I am happy with how it is.

Conclusion

I don’t know.

August 15, 2010

AWF-CMS.org online again

Tags: , — 21:03

Ha, after almost 3 years, the home page of my (so far) biggest Open Source project AWF-CMS is online again. When I started working for Zend in 2006/2007, I felt the need to write a version that is based on Zend Framework. Of course I was busy with my customer projects, so that never happened. Even worse, due to a server upgrade, the configuration for the AWF Web site was broken and I didn’t even find the time to fix that until today. This is bad, as I still love the software. It was really useful and probably still is, even though not properly maintained anymore. As you can see, I decided to use WordPress as a replacement. But there is no cool image management/gallery, there is no Wiki, there is just a HTML/WYSIWYG editor for content etc. This is way behind what AWF-CMS could deliver. At least it is possible to manage multiple sites since WordPress 3.0 – a feature that was available in AWF for a very long time.

Anyways, you can not dance on every party, as we say in Germany :)

August 1, 2010

My favourite music

Tags: , — 17:40

After waiting for 29 years, I finally feel like I know what my all-time favourite music is – I been thinking about this a lot lately. Isn’t this one of the most frequently asked questions when you meet new people? Ok, maybe not on a computer conference or in the office. Anyways, I can be a nerd next time and give them a link to this page…

#1 video

The Smashing Pumpkins – Today

#1 artist (I love all their albums)

Placebo

#1 song (guess this doesn’t come as a surprise)

Nirvana – Smells like teen spirit

and finally the #1 album

The Jealous Sound – Kill Them With Kindness

Powered by PHP, Memcached, Suhosin, MySQL and WordPress