Urban tales of programming

Saturday, December 12, 2009 1 comments
I have to say that this is one of the most enjoyable pieces of text I've ever read. I found it on a conversation on another blog post and I thought that more people related to programming can enjoy it too. Feel free to share it with your managers and your software team "leaders" :)

The Parable of the Two Programmers
Neil W. Rickert

Once upon a time, unbeknown to each other, the "Automated
Accounting Applications Association" and the "Consolidated Computerized
Capital Corporation" decided that they needed the identical program
to perform a certain service.

Automated hired a programmer-analyst, Alan, to solve their problem.

Meanwhile Consolidated decided to ask a newly hired entry-level programmer, Charles, to tackle the job, to see if he was as good as he pretended.

Alan, having had experience in difficult programming projects,
decided to use the PQR structured design methodology. With this in mind
he asked his department manager to assign another three programmers as a programming team. Then the team went to work, churning our preliminary reports and problem analyses.

Back at Consolidated, Charles spent some time thinking about the
problem. His fellow employees noticed that Charles often sat with his feet on the desk, drinking coffee. He was occasionally seen at his computer
terminal, but his office mate could tell from the rhythmic striking of keys that he was actually playing Space Invaders.

By now, the team at Automated was starting to write code. The programmers were spending about half their time writing and compiling
code, and the rest of their time in conference, discussing the interfaces
between the various modules.

His office mate noticed that Charles had finally given up on Space
Invaders. Instead he now divided his time between drinking coffee with
his feet on the table, and scribbling on little scraps of paper. His
scribbling didn't seem to be Tic Tac Toe, but it didn't exactly make much
sense, either.

Two months have gone by. The team at Automated finally releases
an implementation timetable. In another two months they will have a test
version of the program. Then a two month period of testing and enhancing should yield a completed version.

The manager of Charles has by now [become] tired of seeing him goof off. He decides to confront him. But as he walks into Charles's office, he is surprised to see Charles busy entering code at his terminal. He decides to postpone the confrontation, so makes some small talk then leaves. However, he begins to keep a closer watch on Charles, so that when the opportunity presents itself he can confront him. Not looking forward to an unpleasant conversation, he is pleased to notice that Charles seems to be busy most of the time. He has even been seen to delay his lunch, and to stay after work two or three days a week.

At the end of three months, Charles announces he has completed the project. He submits a 500 line program. The program appears to be clearly written, and when tested it does everything required in the specifications. In fact it even has a few additional convenience features
which might significantly improve the usability of the program. The program is put into test, and, except for one quickly corrected oversight,
performs well.

The team at Automated has by now completed two of the four major
modules required for their program. These modules are now undergoing
testing while the other modules are completed.

After another three weeks, Alan announces that the preliminary version is ready one week ahead of schedule. He supplies a list of the deficiencies that he expects to correct. The program is placed under test. The users find a number of bugs and deficiencies, other than those listed. As Alan explains, this is no surprise. After all this is a preliminary version in which bugs were expected.

After about two more months, the team has completed its production
version of the program. It consists of about 2,500 lines of code. When
tested it seems to satisfy most of the original specifications. It has omitted on or two features, and is very fussy about the format of its input data. However the company decides to install the program. They can always train their data-entry staff to enter data in the strict format required. The program is handed over to some maintenance programmers to eventually incorporate the missing features.

SEQUEL:

At first Charles's supervisor was impressed. But as he read through the source code, he realized that the project was really much simpler than he had originally thought. It now seemed apparent that this was not much of a challenge even for a beginning programmer.

Charles did produce about 5 lines of code per day. This is perhaps a little above average. However, considering the simplicity of the program, it was nothing exceptional. Also his supervisor remembered his two months of goofing off.

At his next salary review Charles was given a raise which was about half the inflation over the period. He was not given a promotion. After about a year he became discouraged and left Consolidated.

At Automated, Alan was complimented for completing his project on schedule. His supervisor looked over the program. With a few minutes of thumbing through he saw that the company standards about structured programming were being observed. He quickly gave up attempting to read the program however; it seemed quite incomprehensible. He realized by now that the project was really much more complex that he had originally
assumed, and he congratulated Alan again on his achievement.

The team had produced over 3 lines of code per programmer per day. This was about average, but, considering the complexity of the problem,
could be considered to be exceptional. Alan was given a hefty pay raise, and promoted to Systems Analyst as a reward for his achievement.

....Miles

Source: Social events etc. for ILUG members (mailing list): OT: a tale of two programmers

How to make C# be more like Ruby

1 comments
Ok, here are three links that can help you use C# a little more like Ruby:

How to use Extension Methods to extend C# language


Source: Chaowchaow

DynamicObject Class in .Net 4.0


Source: MSDN Documentation

ExpandoObject Class in .Net 4.0


Source: MSDN Documentation

PTY allocation request failed on channel 0: CentOS, OpenVZ and udev problem.

Monday, December 7, 2009 9 comments
OpenVZ

The scenario:

CentOS linux running on OpenVZ (that is a VPS server) and have udev installed. You try to connect to the server with shh.

The problem:

You get this annoying message: "PTY allocation request failed on channel 0"

The reason:

udev has compatibility problems with OpenVZ. So when you have for example a CentOS system and you try to install ImageMagik the yum package manager also installs the udev package. This leads to problematic setup of the pty devices (/dev/pty, /dev/ptmx, etc) on boot.

The temporary fix:



The permanent fix:

Make a script with the previous commands (excluding the ssh part) and call it from the /etc/rc.d/rc.local.

Thanks to:


Hope this helps - once and for all :)

Reblog this post [with Zemanta]

{Weekly update} Roodi, metric_fu, jQuery autocomplete & other

Sunday, October 11, 2009 4 comments
Official Ruby logoImage via Wikipedia
After putting my finger on many jars this week, here's a short status update on some forked projects (which hopefully will be merged back into the original repos) :

  • Roodi is Ruby 1.9 ready now and here's the proof.
  • Metric_fu got a bunch of new features like DCov support, an (almost) new template and various other stuff merged from other fellow githubers. Still under development and not really yet for merging back on the master repo but we will get there soon i hope :) Until then you can check it out here.
  • jQuery autocomplete (from Yehuda Katz and Rein Hanrichs) got some love with a version bump including various fixes and improvements plus a proper example / documentation / test page (thanks Rein for merging these changes back!).
  • After upgrading Redmine at work to trunk r29xx which added support for Rails 2.3.4 some plugins where broken (charts, graphs and schedules) so we had to update them too. You can find these patched versions on my github account but I guess sooner or later the maintainers of the original repos will merge these changes back.
Cheers to everyone and have a nice week :)
Reblog this post [with Zemanta]

This week, Athens is on fire!

2 comments
Even though I know that by the end of the next week (Oct 12 - 19) I'll be almost dead after not resting at all, I'm pretty exited by the prospects of it! Here's the list of the events taking place in the heart of Athens:
more details now:

Athens Digital Week 2009

An annual event organized by the city of Athens in it's second year of existence. This year, alongside some giant names in Open Source (Mozilla labs, Android, Fedora, Gentoo, Debian, Wikipedia Greece, OpenSolaris, OpenERP, et al) our local ruby community will have a chance to present the language and the frameworks to a wider audience of "techies", programmers or not :)

We will be there on Thursday from 16:00 to 18:00 with this topic list so far:
  • From PHP to Ruby On Rails [ Jim Myhreberg ]
  • A blink into the Rails magic [ me ]
  • Ruby on Rails and Web on Python [ Jon Romero ]
join us there for a coffee / beer and follow the discussion (in greek) on the ruby-hellug mailing list!

OpenCoffee Athens (XXVI)

Right after the presentations at the DigitalWeek we are off to Benaki Museum for the 26th Athenian OpenCoffee meeting for three talks from successful tech start-ups in Greece.

Ruby Meetup #2

Almost a year after the successful "Athens On Rails" gathering (see the videos here), our second meetup (finally!) will take place on the upcoming friday at the Technical University of Piraeus with the following topics:
  • Deploying Rails applications on the appengine using JRuby [ PanosJee) ]
  • Alternative ruby web frameworks (Ramaze/Sinatra/...) [ vtypal ]
  • ╬ťetaprogramming with Ruby [Jon Romero ]
  • How-to make a Rails plugin [ Jim Myhreberg ]
  • Open Discussion & QA
see the official announcement and the discussion on the mailing list (also both in Greek)

--
see you on any (or all) of these events!

Reblog this post [with Zemanta]

GMail Notifier replacements

Saturday, October 3, 2009 4 comments
I never really liked the official GMail notifier for the Mac for the following very simple reasons:
  1. No Growl integration
  2. Support for only one account
So, what are the alternatives?
  1. Gmail Notifr
  2. Notify
Plus points for both are the negatives of the official app which means support for multiple email accounts and Growl integration but i guess i'm leaning to #1 in the list for two reasons:
  1. Google Hosted Apps support (even though the developers of the Notify app said v.1.1 will support Google Apps)
  2. Open-source

If you have any similar tool in mind feel free to write a comment :)

Cheers
Reblog this post [with Zemanta]