Home Software About

I Do

Achievement unlocked: Got married!Written by Peter on Saturday, November 12th, 2011

Hungarian Dictionary

Achievement unlocked: Published your first Windows Phone applicationWritten by Peter on Thursday, August 18th, 2011

Yay, I've been published! No it's not a book, it's my first Windows Phone application that went live on the Marketplace. That's one giant leap for me, one small step for mankind. :-) It's an English-Hungarian and German-Hungarian dictionary which works from a locally stored database. Select the dictionary type you need, then just start typing your word and it will filter the results for you on the fly. Tap on a word to see its translations in detail, you can even add it to your favorites. Check out the screenshots as they pretty much speak for themselves (although they are hard to hear in this size) then I will tell you about the challenges I had with this project.

Screens of Hungarian Dictionary app for Windows Phone
Screens of Hungarian Dictionary app for Windows Phone

First of all, I got my phone a few weeks ago and I haven't had any experience with the OS before. Let alone writing an application in Silverlight which was new to me, however it's not all that different from what I'm working with on a daily basis: ASP.NET and Windows.Forms but still, it needed some adjustment. I started with watching the superb WP7 Jump Start videos of Rob Miles and Andy Wigley, they are very cool chaps and I can say, very efficient teachers.

I was thinking what I should do as a learning project and this dictionary just felt right for this platform from every angle. I've created its predecessor in 2009 for Windows Mobile 5.0, it was a dinky little PDA application for my own use, but the most important part of it, the dictionary database files were done so I didn't need to put energy into that, I could start with basically rewriting the dictionary handler class to make it a bit more efficient and use internal caching for the search as you type method I was about to build into this new app.

Then I had to bite the silver bullet with creating a user friendly GUI that embraces the Metro design language, respecting the user's theme settings of dark / light background and chosen accent color, but still look good and having visible graphic buttons in each case. First I was thinking of using a panoramic layout but as it turned out the pivot layout is a better choice for the app's needs.

I ran into some problems and bugs, too... Silverlight has a ListBox control which was a great choice for the job of displaying search results, first it was all fine and dandy, especially in the emulator. But running the first version on my actual device revealed that my dictionary searching is blazing fast, but then the system keeps waiting for the ListBox control's shockingly slow rendering to finish. Alright, starting over, let's create my own ListBox control that actually works with more than 5 list items... Frankly I expected a bit better performance from the standard one. Then I had to deal with the shortcomings of my solution, two dynamically generated TextBlock controls in a StackPanel for each word, with click detection, hosting the whole bunch in a ScrollViewer... At least it's way faster. Obviously, pivot panning and list scrolling shouldn't register as unintended item selection. And it shouldn't be scrollable if there is no need to scroll due to the small number of items displayed. This issue might be solved in Mango, the emulator doesn't scroll, but on the current OS release it sure does. Anyway, it was great fun to work out all these issues.

I was almost ready when I decided that beside the Search, Translations and About pages I will add a Favorites & History handler page. I'm glad I did, it turned out to be a very cool feature, but my application already handled the Deactivated - Activated states and it kept crashing away when I tried to come back to the Favorites page from Tombstoning. Only one 3rd party application can run in the same time, when the app is not active due to running some other program that takes the screen away, my app practically gets killed (this is called Tombstoning), then it will get reloaded if you get back to it. It could reactivate on the other pages, but not on Favorites. It's becoming a known error, with 3 pivot pages it's perfect, but if you have 4 (or more) then on the third page reactivation will be fatal if you try to select your active pivot page in the OnNavigatedTo event handler, where it would be perfect because you couldn't see the first page popping in for a moment. Bit daft... Hopefully it will get fixed someday.

At this point I already had localized text on the user interface, showing Hungarian text if that's the selected system language, it will be supported by Mango so I can prepare for it. But there is a way to localize the application title and tile title too, so in order to make the app as good as it could be, I solved this issue, I even made a tool to help with this task in the future. And since I was there, I added the ability of selecting the user's own default language, even before the Hungarian language gets supported in the system.

Cherry on top of the sundae, I created the Windows Phone version of Moonbase, my class library of reusable functions helping out with often needed stuff like localization, file management in isolated storage, Style / Brush / Font selection, theme detection and whatnot. It will come handy in my next app.

Go and check out the app if you need such a thing, or just try it out for the fun of it; it's free!

Windows Phone Marketplace website


If you're not familiar with Windows Phone, take a glimpse at its look and feel... Lovely, isn't it?

Windows Phone Mango

New Phone In The House

Achievement unlocked: Got your first smart phoneWritten by Peter on Friday, July 8th, 2011

A couple of weeks ago, after a long debate, I got myself a new phone: an LG Optimus 7. I don't really need a smart phone, but being a fan of Microsoft technologies, I didn't want to wait any longer to jump on the Windows Phone 7 bandwagon. I'm really impressed so far and whatever I don't like in the system is most probably going to get fixed or improved in the Mango update coming this fall. I plan to write about the system a bit more elaborately, but I want to make this post a tribute to my previously used phones.

It won't be a long list. Since I never had too much money to waste, I have always tried to buy things I really need and would use happily for years to come. This is the 4th phone I had in over 11 years and given that it's only two weeks old, I think I've got a rather impressive track record here. I have friends who changed their phones several times a year; if we haven't seen each other for a while, they always showed up with a different phone. Sometimes even in a different car. Let me show you my lineup...

I bought my first phone, the Nokia 3210 in 2000, along with a Vodafone prepaid SIM card. I think this model was a new development then, internal antennas seemed to be a big thing. I had no idea, never even used a mobile phone before but I liked its overall design. It was certainly more modern than what some of my colleagues had around that time, not to mention how badly beaten up those were. Yep, they worked in marketing and sales positions with company issued phones, programmers didn't get one. Not that I cared, I could afford it so I went for it and used it happily for nearly 4 years. It had very low resolution monochrome display, no internal memory to speak of and it was somewhat bulky, but still slimmer than most of the devices in that period. I still have it and it works prefectly, apart from a badly aged battery.

The Nokia 6610 came to me as a birthday gift from my friends in December 2003. I didn't plan to replace my 3210 but it was really sweet from them (and it had to be really expensive!) so I was glad to have it. It was one of the first phones that featured color display, a 128x128 pixels, 4096 colors one that journalists praised on. It was nice indeed, I uploaded a cute Jodie Foster picture as background and it was there until I replaced the whole phone. It didn't go bad, although in its last year I decided to replace its keyboard and shell because it was a bit worn, the paint came off here and there and some buttons didn't register well anymore. Otherwise it was working fine.

Then it happened... In January 2008 I literally fell in love with the Sony Ericsson K610i. I wanted it real bad, just for its looks, I still think it's the prettiest ordinary phone ever made; the finest example of sleek industrial design, like the sexy androids from Asimov novels. A thing of beauty; check it out for yourself from multiple angles. The screen is gorgeous and its capabilities easily put it into the class of smart phones, but these days we think of those as large multi touch screens and software platforms with application stores, so I classify it as an ordinary candybar phone. Honestly I still don't expect more from a phone and I still love it to bits, so it took me a while to convince myself to get a new one.

I can take care of my things so well that natural degradation doesn't really control my purchasing habits. However, during the years I got an iPod mini 6GB (2005) and a Mitac Mio P550 Windows Mobile 5.0 based PDA (2006), both good as new and they all have properties that are missing from the K610i. It can play music just as good as the iPod, but doing so really compromises battery life, plus I hate to use a headphone jack converter with it. The PDA has GPS navigation and can be programmed using the .Net Framework, but it's not always with me so its usability is limited. The K610i had a camera (a front facing one too, in fact) but the image quality is a joke. Almost all mobile cameras are a joke though so I don't hold it against the phone. As I don't take my Canon DSLR with me everywhere, it would come handy to have an OK compact camera built into the phone that I can use, should I spot a burning zombie.

So here we are, I took an attempt to merge my devices into a single one and I think I've chosen well. I was thinking of an HTC Trophy 7 originally for its looks, but the LG Optimus 7 was much cheaper with 16GB storage memory instead of 8GB. Then it turned out that even though the HTC looks a bit better, I love the LG's three hardware buttons, and its camera (or at least its internal settings) is like a thousand times better. Somebody at HTC must have called SharpenMore() in a loop and nobody seems to ever test what comes off the conveyor belt there.

The Optimus 7 is a good phone, I like using it on a daily basis. I kept the K610i as a secondary phone, I put the old Vodafone SIM card into it, that I had to abandon a couple of months ago. For some reason I lost the ability to send text messages to the USA, they seem to go out, Vodafone charges for them, but they never arrive. I waited many months for a fix. They have no idea what's wrong, it must be anything but them. I went to one of their shops to get a SIM card replacement; I instantly became quite popular there with my SIM from the year 2000, after 11 years of usage... Unfortunately the new card didn't fix the issue either, so after yet another useless round with their support center I gave up and bought a SIM from T-Mobile. Magically, that works.

Earthquake!

Achievement unlocked: Experienced your first earthquakeWritten by Peter on Saturday, January 29th, 2011

Tonight around 6:45pm we had an earthquake. It doesn't happen too often in Hungary and it was the first one I fully felt. On the New Year's Eve of 2008 there was one near Budapest, but then I was watching a movie at my desktop PC, with my legs put on the desk so I only felt something weird, like my chair moved and turned a little. I've seen later in the news what happened and I couldn't believe I missed it. But now it was different. I was sitting at my desk, chatting with my friend Ákos online when I heard weird crackling noises from the walls, mostly over my head and when I looked up, the lamp was swinging a little. Then it continued to swing harder and harder, bad noises everywhere, my chair was shaking a bit, I felt the floor shaking with my feet, the desk was moving which made my display nodding. From the first chair movement I instantly knew what's going on so I started typing "Earthquake!!!" into the messenger window while the event was still going on, like that moron in the Bash quote: "OMG my house is on fire, AFK BBL" :) It probably didn't go longer than 5 or 10 seconds but it definitely felt much longer. And I have to tell you, it was scary!

I still couldn't believe it happened, we're not in California after all, I started looking at news portals but of course nothing was on about it yet. Then I remembered how Twitter is basically used as a data assessment tool by seismologists and other scientists dealing with natural disasters, due to people posting about events almost instantaneously, providing an exact location with timestamp. So I went on and no surprise, a friend already posted about the earthquake. I wasn't hallucinating after all! Later it was confirmed to be a 4.8 strength quake with the epicenter near Oroszlány, about 40 miles from my place, fortunately causing only minor damages.

Knowing that (hopefully) nobody was hurt, all I can say... How cool was that! Since usually there are aftershocks coming with this event, I went on to watch 2012, eating madártej (Birds Milk, or Floating Islands as you may know it) that my mom made me yesterday. If I gotta go, I'm gonna go in style. :)

Gentlemen, Start Your Engines!

Achievement unlocked: Created a new websiteWritten by Peter on Monday, September 6th, 2010

Hi, I'm Peter Tihanyi and this happens to be my website. It took a while to get myself to create one, despite being a software developer working mainly on web interfaces. You know how it goes with the shoemaker and his leaky shoes...

Some of you may know me from the so-called demoscene, I've been a coder in the Commodore 64 formation called Resource using the nickname Dale. I'm not really active anymore (well, really not, I should say) but I may still surprise you with a demo later on. Programming has always been my hobby so it was obvious to choose this profession, these days I'm working for a small but cozy little company e-takeaway.dk in Denmark, creating and managing everything on the technical side to make the business run and grow. I was born in Budapest, Hungary and I'm there at this moment, but practically I live in the United States with my lovely fiancée Leslie. I'll be moving there permanently pretty soon.

So this is my canvas to write articles about technical and not so technical subjects, release my own applications that may make your everyday life easier and show you some of the photos I made. The software behind the site is still under heavy development and as most software, it may never be completely done. I wanted to roll it out early so I can start using it. The basic features like navigation, comments, RSS feed and search will come soon, other stuff will come later. I'm well aware next to nobody is reading me yet, I have time.

Oh and why is it Engine Designs? I've got the domain engine.hu for the longest time (quite by accident) and originally I wanted to launch this site on that. It's been sitting unused, showing this page for years but I kinda liked the name, so when I was looking for a future-proof .com domain, I tried various combinations of the word and this one was not taken. It's just a name which, let's face it, doesn't really matter, does it? :-)