Ratko Ćosić - lamentations of one programmer

petak, 18.04.2008.

Devscovery 2008 New York (part II)

Last post was all about my travelling, so this one will be finally about the conference itself ...





Generally, I was impressed about the conference. The only problem was is that it lasted too short, because there were lots of good sessions to attend and speakers to hear. Organization was also at the level; checkin, food, souvenirs, repro-material, conference rooms, agenda, all good. Anyway, you can find the list of sessions here.

On keynote session there was a short intro about upcoming technologies in .net world, especially about three technology tracks in which Microsoft currently spend its money and energy the most: Silverlight, WPF i AJAX. Of ASP.NET, of course, except the Silverlight itself, there was a few words about MVC (model-viewer-controller) model, dynamic data, and data binding.

Because it's been hard to decide which sessions to attend, I've decided to 'roam' around the subjects as much as I could, to catch all different topics.

In the following text, I bring some memos about classrooms I've been and some of my personal impressions:

Translating Architecture to Technologies (Dahlman)

This session was total disaster! When filling the questionnaire, I gave Dahlman a weak mark, and as I've seen on other questionnaires, I was not alone. Man just didn't know to lecture this, although good and interesting topic (I've instantly remembered my good friend Maro Marcinko, which is Ph.D. for design patterns). At first, he began to explain the basis of design patterns since gang-of-four and further (a little bit boring, man!) and then he started to describe one by one pattern. Generally slides were ok, but the man was such a bored guy!! He succeeded to get everyone asleep and until the end of the session only a few guys left. Pitty!



An Overivew of ASP.NET MVC (Haack)

Actually, it was bad that one another session was cancelled scheduled at that time (Windows Forms and WPF - Interop), because it was something that interested me a lot. So I went on this one. But I didn't regret it. It was a good one; very well presented model, with all its strengths and weaknesses. More about it you can find at this sites (on a Scott Guthrie's blog).

Performance of Every Day Things (Richter)

Well, I heard a lot about Jeffrey Richteru, but I never met this guy. He's really a pro, and he answers on every question without doubt giving the impression that he masters on everything he says. And it's probably so. In his lecture, he talked about possible improvements of the performance of .NET applications by using some of his own tests. Tests were very neith done and they compare different ways of doing things, such as: usage of IDispose interface, finalizers, StringBuilders, GC, arrays, and so on. In one way or another, good tips & tricks for every developer.

Day of Threading (Richter)

It's interesting that Richter dedicated the whole day of his lecture to one topic, and that was the threading. I went only to one session, and this one was in the middle, but it was so dynamic and stuffed with the facts that it was enough for me for that day! All that I thought I knew collapsed in one second after I began to listen to that guy. The subject just went deeper and deeper until the bytes and registers of processor that I've just been lost after a while. You have to read his book (I got it from my friend after he won it as a prize, so I thank him: svaka čast, Vlado!) CLR via C# to be at least listener of this lecture. Respect, Jeffrey!

Practical Workflow Foundation (Mehner)

And now, once again, a little disappointment. I had an impression about WF as something brand new and perfect, ideal stuff for my future adventures on software development, but then, nothing new and nothing special about it - it's a small super-limited BizTalk. Besides, it seemed, at least from demos, very slow and complicated. So, the general impression about it was not so good. By, Mehner, as he told, had some experience about it, especially working for some government agency, something like that, and that it proved very well, blah blah.. Hm, I guess, the time will prove who is right. I hope that Mehner will be right, not me.

The Microsoft AJAX Library (Prosise)

This man was obviously well-know for auditorium, as it was very croudy. I'm just surprised in what Microsoft spends so much money. I mean, Ajax.. I know why it spends so 'flashy' money in Silverlight, but for Ajax I don't understand. Especially it is a subset of something already existing. It's just like VBA and Visual Basic - doesn't make sense to have it separated and support it separately. Ok, anyway, nice session with lots of insiders info about roadmap in general.

Builidng Great Web Applications with Silverlight 2.0 (Prosise)

Silverlight, Silverlight,.. all the conference, and so micro IT world just brooming about this spectacular 'thang' with that eluminesquent silver platting (that just reminds me at Abba and all those sissy-like guys in flashy suits, geez). Besides, nice showing of silver light - version 1.0 and 2.0 (they finally get rid of the scripting), but unfortunatelly, as everything else, spitted version as for political reasons (as we know who should they want to throw away from the throne), and only few supported controls and lack of support. We'll see, we'll see...

WPF Internals (Ritscher)

Bah, this is the man you should ask to make a commemorative speeches - I mean, man is a grave. You should motivate him for a life, not just for a session. After story about internals, I couldn't get a grip of anything, not just WPF. Ok, he shown some good slides, though. Man was just lazy to prepare for it or he lost all of his life energy, since he didn't mention any of the examples or anything LIVE. Although he sweared in bright future of WPF (well known Microsoft's paradigma: "king is dead, long live the king"), a man sitting in auditorium doesn't get so much of impression that he blooms of happiness and elan. Ok, maybe he had a lousy sleep (I know what is it, because of my three young kids), or maybe I'm too critic (well, my nominations for the sessions were been refused twice recently, so I'm worst looser).

WPF Data Binding (Ritscher)

Eh, da je bar bilo ispričano kao što je bilo na slajdovima (po drugi put). Nažalost nije se stiglo do pravog 'mesa' a to su template-i i 'napredno' data binding tehniciziranje, pa stoga mi je stvarno bilo žao što je konferencija bila završena s tim predavanjem, te sam imao dojam da mi treba bar još jedan dan za odslušati teme.

Ah, šta sad. Prošla su i ta tri dana, New York je već bivao poznat, a catering s predavanja se već lagano topio pješačenjem po Manhattanu. Dolazio je i taj vikend kad smo morali natrag u Europu, pa u Hrvatsku ;) Lijepa konferencija, lijep grad, puno dojmova...

Goodbye NYC, the city that never sleeps, sleep tight!



- 12:43 - Comments (2) - Print - #

srijeda, 09.04.2008.

Devscovery 2008 New York (part I)

Hola, I've got lazy in writting my blog recently, but for that there are two justified reasons: first, I broke my finger on right hand, and second, I was preparing myself for Devscovery 2008 conference in New York. And then, I'm writing here some of my own impressions from the journey and the conference itself ...





Anyway, it's my first journey to the States, so I was twice excited to go. Flying from Zagreb via Frankfurt, and then over the Atlantic (around 8 hours) was exhausting, especially 'jet leg' of 6 hours backwards. One way or another, the city of New York is really beautiful and you have lot of it to see on the Manhattan, which counts 9 millions of residents, 18 thousands of restaurants and myriads of taxis, shops, delis, excitements, skyscrapers.



(me on Broadway)

What is worth buying, especially if you go on a week or more is certain CityPass card which costs 65 $, and for its price offers sightseeing of six different city attractions.





Kept in mind that the entrance fee for just one attaction is 20 bucks or more - it's worth its price. We managed to see each of the attractions except Guggenheim Museum:
- American Museum of Natural History - phenomenal museum of dinosaurs, decayed animals, mammals, and then a great hall of meteorits, rocks, planetarium. This is the place where the movie Night at the Museum was shot (my kids and I love it),
- Metropolitan Museum of Art with the genuin pieces of Rembrandt and other masters of medieval time,
- Museum of Modern Art (Picasso, Matisse, ),
- two hour boat cruise around the Manhattan (you pass near west, south, and east coast of the island, the Statue of Liberty, Ellis Island, Governor's Island, sailing below the Brooklyn bridge, etc),
- Empire State Building (186th floor).

It's nice that New York, little bit rushy during rush hours from 10 am and 6 pm. What just went on my nerves was those bribing the money! For a whole day a man just got tired of different kinds of 'offerings' - each price is stated without tax (VAT), and at each place you are advised to leave a tip! It's just different from Europe, especially Croatia where I come from. So, for a cup of coffee, which is around dollar and a half, you should add at least a quarter for tax, and then a quarter more for a tip, and finally, coffee is two dollars at min. And so on..

Regarding communication with Croatia, I advise you not to make the same mistake I made, and that is to call home by phone from a hotel. For one minute and 35 seconds of phonecall, you will get sacked for 36 $!
Also, my cell phone by some misterious reason just couldn't get connected to t-mobile network, so it's been unusable for a whole trip. I went to a local t-mobile shop there, but clerk told me if the mobile phone is bought in Europe and there registered, it's not compatible with America! Great!
I rely on Skype, but the problem was that there are not a single internet caffee with Skype available!
So I was practically dead for my dearest for a week!

Image Hosted by ImageShack.us

(me and skyscrapers of Manhattan)

More of my pictures from New York City you can see here.

So much about NYC, next time I will finally try to write about the conference ...

More about it

- 07:57 - Comments (1) - Print - #

utorak, 08.04.2008.

Database generator





I'm a big fan of the famous Nikola Tesla. Not just because it is my national hero, but because it was just a genius. I wish if I could have such ideas! Well, I don't, and I won't bother .... I have a few little and interesting ideas though.

One new, but again old topic which I want a little bit to lament about, is one small solution which 'stuck in my eye'.
I'ts about a C# application (but it can be also, a clipper app, e.g.) which should serve for generating the data (in this case, the emphasis is on reality of entered data), which should use to make a good foundation on testing the application.

Here is what I was thinking and (until now) coded ...

Basically, it's about a small C# project which I named DataGenerator. It consists of couple of files:
- Program.cs - the entry point in the app, it calls the main form,
- Form.cs - main form - contains entering the parameters of the database (TextBoxes, combos, radio buttons),
- DataManager.cs - singleton class with general-purpose functions of data layer (methods like Connect, Disconnect, Execute, List, Store, etc),
- DataGenerator.cs - class which serves for generating the data depending on the structure of a database,
- DataSampler.cs - class which serves for sampling the data based on some algorythm (uniform distribution, random picking, and so on).

First three files are self-explanatory, so I jump into the last two:

DataGenerator
It is structured as set of methods which add arrays of data in the database (for example: AddAccount, AddEmployee), or adjust the data depending on business logic and rules (for example: UpdateCompany, SetParameters, CalculateLoan). Each of the methods should be created as much as simple and short as it can, and it should be clear what is it doing. It should be able to be called multiple times by some loop and as part of a transaction.

DataSampler
This is the class which shouldn't have anything to do with the database, but it's rather just a math. It contains the methods which represent different kinds of algorythms of sorting and meshing the data by some criteria; random values from some set of n, uniform distribution of values of n, and so on. It should also be flexible and extensible to accept new algorythms later on. It should also be able to support (or call some web service) with the sets of already-done data, such as names and surnames, randomly generated names of the streets, descriptions, etc. This idea actually lighted a bulb in my head when I was playing Dungeons & Dragons with the RPG game generator (creating names of a character, for example).

As I've previously said, the aim of such an app would be generation of set of data as much closer to the real life, to produce the most realistic solution. And that is the best to show in examples...

Let's say we have an app which should maintain employees, or members of some organization. In that case, we want to test the performance of the system with, let's say, 10, 20, 50, 100, 1000, and even more persons entered. The problem is how to generate such set of data regarding amount of data (maybe it is not possible to just copy the rows because of analitic data or some database constraints), or realistics (there is no point to have thousands of persons named John Doe with the same data inside).
The suggestion is that the employees' being sampled in such a way that you can parameterize the number of employees and that the application samples (in a way that developer wishes), let's say, one half of male and one half of female workers, each of them having his/hers unique first and last name, address, evenly spread zip codes (let's say, every 50 workers in one state, and then every one living in one bigger town), aged from 18 to 70 (not just random number because of the employment regulations), situated in company branches and offices by some algorythm, and so and so.

Also, in simple way it should be created as least three functions which could be called by pressing the button on the form:
Generate - generation of data based on given parameters,
Clean - deletion of data (even based on given parameters) so you can perform test generation over and over again, and
Backup/Print - backing-up the data (if the database should be shipped somewhere externally for testing or evaluation), and report about the generated data to make sure everything is properly entered.

I realize that such a 'small project' in some cases just don't worth a dime to develop (if it is very small set of data), or that it can last for a while it is developed (if it is a complex system), but I think for the most of the cases, it pays its development, especially in a way that eases the life of testers, which are, as we know, an integral part of Visual Studio 2005, actually Team System's team in a whole.

- 19:40 - Comments (0) - Print - #

<< Prethodni mjesec | Sljedeći mjesec >>

Creative Commons License
Ovaj blog je ustupljen pod Creative Commons licencom Imenovanje-Nekomercijalno-Dijeli pod istim uvjetima.