Thursday, 16 April 2015

Fixed it! or The strange case of the shared numbers.

Hello everybody!
Yes, it is hard to believe, even to me, but I have been working on the same problem for the third week in a row. Actually, if you see the incidents separately, they don't look like the same problem, but in fact they are. I could explain with all the technical terms and write a boring post which nobody will read.... or I can tell a simple and nice story, almost a fable, and write a interesting, maybe funny, post which nobody will read. Of course I'll do the second one.

Once upon a time a fresh and promising company. How any other company, this had some customers, there is no surprise on this fact. Those customer wanted to buy products, and this little company was exiting to sell them, so they were all, customers and company, happy. Sometimes, some of those customers, paid more than they wanted to buy, how can happen in any other company, where is no surprise on this fact. When this happened, the Company had no problem to give the money back to the customer, and this way, they
could be still being happy together.

On the paper the thing were as simple as that, but the company had to have all this transactions, -picking names randomly, orders when the customer bought, returns when the company gave money back- in the system, to keep the records, reports and other boring and administrative things which let the company grow up. Thereby about this time the company bought a system to manage all this data and implemented it on its guts. The system worked perfectly and everybody could be happy and probably was. This system, and now I'm about telling some highly relevant data -this is not a Sherlock Holmes story, I want you to keep the details, there will not be a living room scene-, assign a number to every order and return it generates. As curiosity, it can manage a number being shared to an order and a return with no complications, though it never had to do such a thing.

The company, with his new brand application was quite happy as a kid with a new brand toy. It could sell its products to its consumers and invoice then to keep the archive, and same with the returns. But the company, as every good one, was more ambitious than that. They wanted an application to rule them all. An application to automatize many of the processes that they have to do in the whole order's life cycle, with a friendly interface and a nice company logo on the main window. This application would be connected to the bought one, which was in charge of all this important staff about taking and giving money from and to the customers, but this new one could be in charge of all these particularities which made the company different to the rest.

This application was made by a person whom I never met, but whom I can tell a few things thanks to his code. How some wise one said one time: "Tell me how you code, and I tell who you are". This man was intelligent, and mainly autodidact, but he had no experience coding. Probably it was his first formal application and, frankly, this had to be an actual challenge to him. The thing is, when you know how to code, but are a strange to the right way to have the things done, is like if you know how to move chess pieces but have no idea about strategy. You can play, but probably you won't win. This developer played, and was beating problems as they was coming, and finally got a functional program which fit with the company expectations, but he didn't follow any strategy and the application, although it does whatever they wanted it to do, don't do anything in the correct way.

The database is a chaos, redundant data and mazy relations, crazy and unmanageable procedures and slowly-as-hell queries to generate views (usually a view is a optimized way to view the data... in this case is a madness guilty to have loading times to most of the windows in the application, loading times that people are used to manage as it was the most common thing and no-avoidable what's not true. And really wrong fields chosen to make the links between its database and the third party database which was being used for the company since beginning of the days. And this is the main protagonist of this history.

As I said, this third party application could work with shared numbers between orders and returns, although it never happened. This never happened because the two sequences of numbers was set with a big difference between them. What happen with these numbers on this new application? These numbers are used to link an order in the new system with the old one, but these numbers can be no-unique, thereby this link can link a single element of the new application with two, one order and one return with the other, the day in which the lower of the sequences reaches up the bottom of the higher one. In other words, this new application can't manage a shared number between an order and a credit note, and if someday these sequences match, this would be a doom. And nobody could foresee it.

All right, this date, the Doomsday  from now on (or D-Day -wink-), is not a theoretical date, it's not a scary tale to tell to those kids who doesn't like to eat their vegetables, this date is real, and it has its own name: 24th March 2015. This day everything went wrong with the invoicing system, and no one had a clue what was happened. Problems started to show up in many fronts, and when you could fix one, like a hydra, other two occupied its place. Luckily, and yes, it was just a big huge amount of luck, I found the problem and I set the number of one of the sequences about 800% bigger than the other, but the problem was still there. Before we realize this was the problem, many orders and returns shared the number, orders were duplicated and too many other boring things. Step by step I could fix every and each one of them (crossed fingers) related with this problem, but probably (pretty sure) my changes will have consequences in the future, because, you know, those Jenga pieces have been moved and the equilibrium of this maze has been altered.

At least I can tell I'm starting to map this labyrinth, and I think people in operations team are happy with me, what is the important. Ego's one is not going to be boosted by itself.

In next episodes...
Will a simple and foreign developer can beat the Minotaur of this labyrinth?
Will our charismatic protagonist buy a car so he doesn't have to take a taxi whenever lost a train?
Is he going to move out to a closer place soon?
Is he going to achieve a listening skill enough to watch anything without closed captions?
And the most important, will he can understand his workmates' technical problems at the first try?
Soon in your computers. Don't lost!

Thursday, 9 April 2015

Travel to Wales, Land of the Drag... Sheeps.

Hello Everyone!!
I'm here sooner than you expected, I can tell it. Well Actually I've planned this post some time ago, in relation to my recent visit to Cardiff, to one of the famous Terminals of Prax (my company, or one of its names... I'm still lost with that). To be honest I never wanted to go, so probably I didn't get this travel with the best of the moods, I wasn't willing to get away to my girlfriend and to sleep alone. But I always keep the chance to have some of fun there in the north. I thought I could even visit the city around, mainly since all I know about Cardiff can be resumed in three points: 1) It is in wales, probably the most celtic country, and I kinda like celtic stuff... at least I liked that trilogy of books than my brother lend me somewhen (I'd swear they're still in my mothers house); 2) There is a football field, probably belonging to somewhat important team, as one of my former-former-colleagues in the sauna went to there to see a mach between Sevilla and Real Madrid, although I don't like football so this is less relevant to me; and 3) There should be a Time-Space Rift (also known as The Rift) which is used by The Doctor to recharge his Tardis. That could be the less relevant thing about Cardiff, since this is stuff from Doctor Who and I still can difference between fiction and reality, but I don't know, maybe there is something touristic to do about the show... At least I didn't know even that city exists before I saw it on the the series (please, forgive my ignorance). However my touristic visit to the city will've to be in other time.

The adventure started on Tuesday, 10.30 am. I was at my office waiting for my travel-mate were ready to go. I was working to build a new room to our lovely unstable labyrinth when we were ready to departure. A brief stop in Tesco to get provision and fuel to the van and so. The travel was long, and bored. Sometimes a little chat, sometimes a few twits and I'd say I had a little nap. Actually I know I am not the most sociable person, even in my own language, but in English I'm worst. I know that and probably if I had been traveling with anyone whom I fell closer it could've be some different... but one doesn't chose their cards.

Well, after 3 hours we got the office in Cardiff, in the port, to be precise. The people there were really nice. I couldn't stop to imagine them as masculine men of the docks, whose hands were bigger than my face. At the beginning I was a little afraid to don't understand them, I'm not used to welsh accent, but I didn't appreciate anything. Indeed I might say it's harder to understand some Londoners... we were there installing some computers, we couldn't start with the server because we didn't have the right rails to install it on the closet. At 6 we had enough and went to the hotel, after a couple of mistaken tries to find hotel's parking (it was hider than it should) we checked in and went to walk around, to see potential places to take our dinner. As in the car, this probably had been nicer with either, me being more sociable, or being with someone whom I knew better. But we were chatting a little and checking the zone. After that we get into the hotel, and expend the rest of the afternoon there.

At evening I called my mate to plan something to dinner, and we went to McDonalds. Not the best place but we got fed at least. I enjoyed an ice-cream for free thanks to the current promotion (that one to collect monopoly streets, cool!) I realice that the closest street to my house, Whitechapel Road, is on the worst street group. To explain, that means I'm living in the Londoner version of Lavapies. After that we went again to the hotel, and I use my time to watch something of British TV, therefore I have no TV in my house yet. I started watching a pretty boring "Movie" movie, exactly Date Movie, when my girlfriend get out of her job and called me. When we hanged up, I've lost most of the movie so I zapped to found one of those movies you never know about, and probably never will unless you got lucky. Something like when at my parent's they changed the channel and was starting Iron Sky, one crazy movie about Nazis based on the Moon. This one was called Cockneys vs Zombies, so it couldn't disappoint... and British (you can tell it for the title) so two points in favour. If I had to resume the movie using a line, and thinking this line is not actually a hard work, that movie was like "Shaun of the Dead" crossing over "Lock, stock and two smoking barrels" or whatever else of the Guy Ritchie's first works. That movie was probably the best of my travel.


The second day was worse. We took our breakfast (not a bad one, I have to admit it) and went to the office again. We finished of configure the computers and we started with the server. Actually we haven't got the right rails yet, so the temporary solution was place the server on the top of the rack. To be honest most of the time I was doing nothing. I feel quite useless and unproductive. And the day before I receipt a call of my manager telling me what something was imploding in the invoice system (actually we have been inherit problems for two weeks, as I tell, when a wall falls in the maze never do it alone, and the wall which fell two weeks ago was little but bloody important, and started a kind of ripple effect in the whole system) I couldn't help but think how I was wasting time on Cardiff instead fix the problem and probably finish the new feature to the end of the week (now I know that's impossible, goodbye bonus). In addition, the server was causing troubles. Better said, the network configuration was doing and didn't want to be friend with the new server. We had to stay there till almost 9 in the evening.  So we arrived to London at 12, so I get my home at 1 so I overslept this morning... and you can tell I won't receive a pat on the back (so better don't talk about bonuses...).

Thursday, 2 April 2015

X-Treme Programming

Hello everybody!
Here we are once more time. This time they waiting's been short than the last time, probably it is because a) I have more time to develop my creativity (even losing about three hours by day in travels, and "gifting" one hour more to my company thanks to bus times, see last publication); or b) I am so less tired after job-sessions than before by far. I'd bet a combination of both. However I am here again and I am plenty of news to spread.

My first month with the new job has been interesting. I've had a chance to feel confortable with the place, knowing more about the business step by step (though sometimes such step means be push into a spiking hole, I'll expand it later) and knowing more about the application we have to maintenance while the new one is developing (if it is someday), knowing better the people whom I have to work with (I'm still liking them), and, resuming, feeling like I am one more member in the team.

In the other hand, I've realize another significan disadvantage. It is relating to the traveling (what else?), not about the time but about the money. Transport in this country is not cheaper, that's known by all, but this is crazy. I have to take a tube from my house, East London, Zone 2, to Waterloo Station, Central-South, Zone 1. This ticket, is off-peak if I don't get delayed at mornings, £2.30 each; once I get Waterloo, I have to get my all-lovely-train to Weybridge £15.40 out and return ticket; and from Weybridge, if every happens on track, I can get a bus which drop me at office's door (yes, 30 minutes before my must-in time) whose tickets cost £2 each. Thereby, if I don't oversleep, and tube-train combination don't delay I spend about £25 per day. If something goes bad, I have to pick a taxi from Weybridge to the office, which cost about £5 (this have happened two times till now, and no one because of my, but the train...). According all of this, and since my girlfriend doesn't seem to quitting from her job, everything points to me buying a car.

Getting a car is not an exiting idea to me, I don't like drive, I don't like have a car (costs, maintenances, responsibilities, dependencies...) and I don't know a damn about them, so I'm afraid to be deceived by any of these cunning knaves who fill this city. But probably I'll do it finally. I don't wanna expend so much money on this, and if I can chose I prefer a diesel motor, to expend even less on fuel, but right now it's so early to say anything.

Turning back to the job. As I said I like it, actually a big amount of my energy have to be focused to fix any raised bug in the old application (from now on Old Sorax, hopefully I'm not revealing any company secret) with, common sense'd say, shouldn't be too much as this application is being used for six years or so, but If you don't mind a small literally touch in this, we can compare a good application with a tough castle, but modern and prepared to be changed, with sockets and plugs to add, remove or replace different parts of this castle. A bad application can be like a small settle, with thin wooden planks stuck at ground in a way that you couldn't move it if you want, but a wind with strength enough could break the wall in bits. This application is none of those. This one is a maze made with Jenga blocks, you have to go over the corridors (and got a dead end many times) to find the wall you wanted to move, and when you find it, probably the wall and the ones touching it fall down because you sneeze to close of them.

My job, sometimes is moving walls, or create new ones, but sometimes I have to find a hole in these walls and plug it, what is like sneeze but ten times stronger. I actually find this pretty entertaining, and let me be closer the rest of the people in the office, which is good to my English skill and to my social life (someday my girlfriend won't can say all my friends are actually hers) and, to be honest, fixing bugs is my favourite part of a developing job, even when I have to deal at same time with three Critically-Critical-Dead-Threaten ones as have happening latest days (headache is my middle name)... Maybe I have something broken on my head, but I actually enjoyed it, even when I stare at the code and I can see how it is staring me back with evil intentions.

But working is not every I have been doing. I have had time to take some beers with my colleague in
here, yes, who was gonna say I was gonna drink beer with a relative frecuency. It's true I never was a beer lover, but I've found these ale beers more interesting than usual lagers we can find in Spain. In addition, spend a time with people outside job environment is really thankfully.

Besides I have spent more time with my girlfriend's mates, whom are, at this moment, the closest thing I have right now to actual friends (with a exception of my workmate whom I hang out to take beers). A couple weeks ago we went together to Thorpe Park, a theme park near to here. It was awesome. I had lots of fun, and I loved it. This parks reminded me a little to my childhood theme park, both are small compared with others like Warner Bros Park or Disneyland, and both don't concern too much about decorates and atrezzo, they just care about rides. Those rides were so exciting and one of them, my favourite, named Colossus, was really thrilling. It was funny when I was perfect posing in all the pictures on the rides, looking at the camera and smiling or so... but what can I say? I have years of experience posing at rides to get the perfect picture.