Tuesday, 18 November 2014

Playing with colors

We had a graphic designer to carefully choose some nice colors for our software. The colors do look nice, but are not representative enough. So I decided to change some of the colors to better inform the user about the nature of the data.

Like this:

What if all past items would be grayed out, because, well, they are past items?

And because the holidays are coming up, let's show the user nice red and green bars when she wants to see how well the company is doing in comparison to last year.

Accounts Payable needs some nice colors to lighten the mood.

For those who don't understand my sense of humor. I did not actually use these colors. They might look fun, but are definitely not the best ones to help the user to understand what kind of data is shown.

My lesson: Respect the graphic designer (and save some headaches).

Monday, 13 October 2014

It's autumn again

I kind of forgot about this blog... Good thing I didn't forget about Valvomo too, but I've been busy creating new features and perfecting the old ones :).

One thing that has caused some extra work (I would say grey hairs, but I still have none - grey I mean) was accounts payable and accounts receivable. I had a functioning data structure, and then this evil piece of balance comes along and does not want to work with my structure! How awful. Well, I did manage to force the balance to obey my rules, but I'm predicting a refactoring session in the near future.

Well, since this post was all about reassuring you that "I have not forgotten about this blog" (which I had), and I had absolutely no idea what to write about, I'll cut it short. I'm trying to write something even remotely intelligent next time. Now I'm off to perfect the line graph view!

Friday, 11 July 2014

About strict deadlines (and the feeling afterwards)

We recently had a release party with a fixed date, and - thankfully - a flexible feature list that needed to be ready for the release. This created the first actual deadline for this specific software, because all of the previous deadlines had been set by myself; "I need to get this finished today" or "These are this weeks goals". Self set deadlines are easy to break ;).

The deadline naturally caused stress, but more importantly, it caused a black wall inside my head after the set date. I knew exactly what I should accomplish before the deadline, but had no idea what I should be doing the day after the deadline.

All went well for the release, even though we had to abandon some features because time run out (but hey, a software is never ready, and I have yet to seen a release with a fixed date in a project with fixed resources that contained all the planned features). But the next day was difficult. We kept asking "what now", even though we all knew things were far from completed. I felt a little lost, a feeling that did eventually subside after I read through the issue backlog, and we had a planning session.

The lesson I learnt: Even when you have an important release with a strict deadline, plan ahead. Make plans for the week after the deadline. Plan ahead of time what is the first feature implemented / bug fixed after the deadline.

Tuesday, 6 May 2014

Inbox (4285 new messages)

Lesson I learned today: If you code a fancy mail-me-at-any-error -system, use some a lot of time to think about a maximum limit for the e-mails. Or apply some intelligence into the system, so you won't be getting a new e-mail for every single row of imported data that has an offending value.

If you don't, you will regret it after the first few hundred messages, when all you can do is kill the software, flush the still present queue, and wait for the incoming mails to stop.

Wednesday, 30 April 2014

My Office

I decided to take some photos around "the office".

Here's the view from my office, note the "office chair" at the bottom of the picture. It's about 10 degrees Celsius here, but the sun is shining brightly. Good thing my laptop has a bright screen.



And here are my closest (measured in distance) collegues: Artturi, Konkari, and Rissanen. They have a strict work distribution: two of them only observe and eat long lunches, while the third one is a software designer trainee. I have named him trainee 'cause the only thing he has so far managed to type is a series of spaces...


And finally, the canteen, that has a rather unhealthy selection of foods. A nerd needs her daily dose of caffeine ;).


Before you ask: Yes, I'm a telecommuter (hurrah, I learned a new word today!), so I usually work at home. It has it's benefits, especially when I need some peace and quiet to think about a problem. Though there are days, when an intelligent conversation or two with a co-worker would be nice.

Wednesday, 16 April 2014

Choosing the Programming Language

If you are looking for serious advice about what language to choose, look elsewhere. Please.

PHP: Everybody knows how to do your job better than yourself. And they will gladly tell you how.

C/C++: Assume the environment never changes and curse the government when they do.

Assembly: Your friends will send you to a doctor 'cause they can't understand a word you say. Good thing you can always find new little friends inside the microprocessors.

Ruby (on Rails): Be loved now and abandoned tomorrow.

Java: Get frequent hate mail (but get things done).

COBOL: Be the dinosaur no one understands, and everybody laugh about (and laugh back when you get a job maintaining a system at a big corporation - a job with a fat paycheck).

Anything with a connection with Microsoft: Divide your friends into two groups ferociously fighting each other.

Scala: Get nothing real done, but have a good time (not) doing it.

Seriously speaking, my lesson for today: Choose the language you know best (or want to know best), and ignore the rest. Maybe with the exception of ArnoldC.


PS. My son wants to learn "to code". I guess he doesn't yet understand what "coding" really means, but until he realizes it's not something he wants to do, I'm gladly teaching him! I'm off to select the best language to teach to a 7-year-old :).

Friday, 4 April 2014

Java Presents: The Exception Stack

Everyone who has ever tried to code in Java (or run Java applications...), has seen the ... eh ... "beautiful" exception messages it provides. The exception stack is so big, it won't fully fit into your console log, and instead of a clear error message you are left with hundreds of lines of error messages that might or might not lead you to the actual error in the code.

My personal favorite is the one that says "Please, master coder, I can't find this class definition! Help me!", and the class that it tries to find is the actual exception being thrown. And that exception is being thrown from a logger that is trying to send an error report to the admin about an another exception thrown.


After creating this beautiful masterpiece, I'm off to check why my code is throwing the exceptions ;).

Wednesday, 2 April 2014

Why We Need Mathematicians

Any software engineer can add two numbers together, and that's about all it takes to show nice graphs about last months sales, amount of coffee cups consumed at a meeting, or really basically anything you can count. A lot of data (and I mean a lot - I'm just in the process of importing millions of lines of test data into my local test server) plus some simple arithmetics equals nice graphs about history. So we don't need a mathematician to tell us how to count one plus one.

But when we want to show a graph about tomorrows sales (or coffee cups...), it's an entirely different matter. Statistics, estimations, means, variations, deviations, means of deviations...  Now it's time to hire a mathematician! Or a fortune teller, but let me tell you, genuine fortune tellers are hard to find.

Math experts can use all sorts of cool techniques to <content censored due to company policy about leaking business critical information>.

PS. One of my favorite blogs is Math with Bad Drawings. Blogger is a mathematician/teacher, and I absolutely love his subtle jokes. Though I've been said to have a strange sense of humour...



Friday, 14 March 2014

Commenting the Code

I don't mean pointing at a function and saying thing like "Oh how it is so very cute! How old is it?" or "Why hasn't this one been though any manners? It's rude to handle your variables that way!". I mean writing comments about the function of classes, functions, and operations for the future developers to see.

It is too easy not to comment.

You think the function is so short and easy to read, that it would be a waste of disk space to write a comment about it. In reality, the function gradually grows to be a monster of a function, and still there are no comments.

Or you think that the few lines you wrote are just temporary, and will be removed tomorrow. In reality those lines will haunt your grandchildren (okay, maybe not, but at least they stay in the code for multiple of years).

Or you think the only person will ever see the code is yourself, and there is no need to comment because you know what the class does. It might be true, that no one else will ever see or use that particular piece of code, but after a while (and thousands of written lines) you will forget what it supposedly does. And then there is no one else that could remember the true purpose of your code.


So "lessons I have learned am trying to learn, part two": Comment, comment, and comment. For your own sake if not for others.

Thursday, 13 March 2014

Jumping from One Tool to Another

We are an agile organization. It means that whenever me or my younger collegue find a new shiny tool, we immediately want to use it...

Our latest find has been Atlassian products, which include JIRA for project tracking and issue managament, Confluence for wiki and meeting notes, and finally Stash (Git) for source code repositories. So far it is looking good, and integration between the three tools is a lot better than the system we had previously.

One has to love small organizations: It took us couple of days to think about changing the toolset, and then couple of additional days to install and configure the tools, and copy all necessary data.

Time from the initial suggestion to active use: seven days.

Of course, new doesn't automatically mean it's better. But as long as the change does not require a large investment (either money or time), it might be worth a shot. Just remember not to ship the old tools straight to /dev/null...

Friday, 28 February 2014

The Art of Simple Operation in a Complex Application

What's one of the first things a web application needs? A login and user management, of course! It is easy, just an html page with a form, a simple server-side script that checks that the password is correct, and maybe a link to log out a user.

Or not.

Our software has user accounts, which are tied to a company. Which in turn might be tied to a larger organization. Each user account might have multiple roles, both administrative and operative. A user has status, dashboard, history log, and a lot of other information.

Just to present a simple login form (just presenting, not even submitting), we need a template view, a template processor, a service class, and a bunch of Java libraries. And little things like a Java Application Server and an actual server that hosts all of the mentioned stuff.

In addition the login function needs a database server, some tables (hopefully with some data, too), cryptography algorithms, another view, multiple domain classes, service logic, and database access classes for our domain classes.

This leads to a rather complex setup just for a login. Good thing our application does a lot more than just logs users in and out!


(After seeing this awesome image, it probably won't be unclear to anyone why I am a programmer and not a graphic designer.)

Wednesday, 19 February 2014

Starting from scratch

Starting something completely new without any previous code is difficult. It sounds nice; "Cool, I get to decide what conventions to use, and will not - never ever - do (insert your most hated bad programming habit)!". What sound even nicer, is the fact you get to choose what language, platform, and framework is used, instead of spending your days cursing some innocent designer from the dawn of the software about the "poor" choices he/she made.

But in reality, it is scary, and hard.

Trying to form a good overall plan based on other people's thoughts and white board scribbles. 

Trying to select the best possible programming language / framework / database that will adapt to your current and future wishes. Combing through hundreds of pages of hate-love -posts on forums and blogs.

Trying to be agile and modern and everything, while supplying "the customer" fixed estimates, roadmaps, and promises of a release date.

What if I make the wrong choices, and I'm unable to fulfill the requirements without tripling the estimates? What if someone else comes along, and says how stupid I have been? What if...

First lesson for me in this new position was that every choice can be remade. It is better the sooner I realise that a particular solution is not optimal, and the sooner I find a new solution. Even if it means losing days of worth of code, and missing my (self set) deadline. At least this way I wont have to put of with my own poor solutions next month - or next decade!

I have started this current software project last fall, so I've gone far from the initial empty Java project. I have made a few poor choices (which I hope I have corrected all), but some good ones too. I'm trying not to get too fond of my choices and solutions, 'cause one day someone will find a better solution, and I have to be able to let go or "my babies".