asp.net issues

Yesterday I was building a small webapplication for a client. The user had to enter a code to retrieve some data. So I added a Label, a TextBox and a Button. I wrote my code tested it and it worked. I wanted to show it to the customer and suddenly it didn’t work??
Hmmm strange, I tried it a couple of times, still the same. Then I did it step by step. I filled in the code, pressed the button and voila there was the desired effect?
What was the problem? Well it seems that in the internet explorer version I had, when I filled the TextBox and pressed the enter button instead of clicking on the mouse button, the event of the login button pressed didn’t get fired. Firefox on the other hand tends to do press the submit button if you do the same actions. So you are on a textfield, enter some data and then hit the enter button. It will press the real form button, if there are more than one (like you have in asp.net appz) you have to take notice that the right ones backend action gets submit.
How did I fixed this, simple just hooked op the OnTextChange event with the same EventHandler of the ButtonPressed.
So if you do asp.net dev, please do check your browsers and don’t only trust the debugging sessions with your iexploder.

Also if haven’t heared about it yet, you should really checkout the firebug beta plugin for firefox (It wasn’t available on my ubuntu using apt-get, so you should install it from the xpi!)

a downside of offshoaring I never thought off

First off sorry if the title has spelling errors, English is not my mother tongue ๐Ÿ™‚

I’ve got my new car radio installed and I can again listen to my precious podcasts. I can even connect a usb stick with podcasts on it \o/.
Yesterday I was listen to a binrev show. They were discussing security aspects and offshoaring. They were talking about an offshoaring to china that wen’t horribly wrong. A well known US car builder wanted to offshoar the assembly line to China. They contacted a Chinese company to handle this. They sent all the data for building the shops. The chinese company took the data and created there own assembly line and started producing their own cars, they were almost an exact copy of the cars they were building in the US, because the didn’t have to do any research they had cut a lot of costs. Combine that fact with the low wages and you can imagine why the car was incredibly cheap.
They tried to sue the Chinese company but the (Chinese) judge ruled in favor of the Chinese company (what would you expect).

Maybe call me narrowminded, but I see this as another good reason not to do offshoaring (or do it,but don’t move everything). If I’m not mistaken more and more companies are offshoaring their it development to other countries. I’ve got no problem with that, but if you do, make sure that you know what you are doing. If you offshoar everything those companies know exactly how your company works. If they manage your email systems, I bet they have almost enough data to create an exact copy of your local company and produce all the products you produce. They didn’t even have to do any research. Ok, if they did it theirselves you would know. But what if one of their employees has a usb stick of 10 gig and they take the data and sell it to a small competitor over there. You can be sure that some big supermarket in the western world will notice and start importing it.

I haven’t noticed the offshoaring of IT development that much. But I know some companies are doing it, offcourse it’s cheaper. But did they ever think about what impact this could have? Just imagine that google had offshoared the actual writting of their search engine to a Chinese company? Would they still be in the position they are in at the moment? I really doubt it!

In short, think before you do something (as always)

Javapolis

I went to javapolis, I have to say, I’m glad I went. I saw a lot of old friends there. Nice to catch up what they had been doing the last couple of years. Someone even called me ‘The enemy’ because I also did dotnet. But hey I like programming and don’t want to be bound to 1 language, why constrain yourself. We as developers are so openminded, why not about the language we do it in then???

I saw some demos of flex2. Well, Adobe / Macromedia have built a nice tool, I really have to admit. I’ll be given it a test drive. I’ll also give openlaslo a go, but according to one of their ‘sales/consultants’. It is not as far yet as flex2. And I’m pro opensource, but I’m not anti closed source. There’s a big difference and if the product is worth it, I’ll pay for it. In the future I will pay for a copy of Visual Studio if I’m the express edition doesn’t furfill my needs. If you do dotnet development on windows I’ve tried sharpdevelop (on linux monodevelop) and for oss development its ok, but If I’m doing work for a client I calculate the hours it takes. Well If I can buy a product that makes me work faster why not?? For doing java development I use eclipse because thats somewhat the standard and I can work very fast in it! So there’s no problem! But for dotnet windows client development the situation is different!

Topreader Desktop Development (2)

This weekend and this evening I did some more TopReader development. I got stuck on the right mouse click popup (context menu) for creating folders,adding feeds, … I asked #gnome and Murray pointed me to the UIManager class. I have to say this is a nifty thing!!

For those out there who (like me) didn’t know about this Factory, it reads an xml file like the following

<ui>
  <popup name="channelpopupmenu" action="channelpopup">
    <menuitem name="MarkRead" action="MarkRead"/>
  </popup>
  <popup name="folderpopupmenu" action="folderpopupmenu">	
    <menuitem name="CreateFolder" action="CreateFolder"/>	
    <menuitem name="AddFeed" action="AddFeed"/>
  </popup>
</ui>

In your code you just do this for initializing it

uim = new UIManager ();
uim.AddUiFromResource("FeedMenu.xml");

And if you want to show a context menu, you intercept the right mouse click event on your widget and do this little piece of code

Menu w = (Menu)uim.GetWidget("ui/channelpopupmenu");
w.Popup();

The widget is retrieved by the tagname or its actual name
As easy as that!!!

Now we take it a step further. During initalisation we do this

uim = new UIManager ();
uim.InsertActionGroup (group, 0);
uim.AddUiFromResource("FeedMenu.xml");

Where the action group represents a group of Action objects (Duh)

ActionEntry[] entries = new ActionEntry[] {
    			new ActionEntry ("MarkRead", Stock.Cut, "MarkRead", null,
                     "MarkRead",
                     new EventHandler (OnMarkRead)),
                new ActionEntry ("CreateFolder", Stock.Cut, "CreateFolder", null,
                     "CreateFolder",
                     new EventHandler (OnCreateFolder)),
                new ActionEntry ("AddFeed", Stock.Cut, "AddFeed", null,
                     "AddFeed",
                     new EventHandler (OnAddFeed))
                   };

I haven’t configured them as you can see, all are the Cut Stock item.
So we linked the selection of the context menu item with the designed EventHandler.

One word: SWEET

What can I do so far with my app, well I can create folders, add feeds, read feeds, mark a whole feed as read. In the backend the feeds get updated automatically. As I mentioned everything is stored in a small sqlite3 database, for 318 items it’s 600 k, not tho much if you ask me. I wonder how much feeds I can archive before I reach the limit of sqlite (thought that was 2 gigs,but not sure)

I’ll keep you posted (offcourse it’s gonna be opensourced, LGPL probably as I like it more than the GPL)

Silence is a good thing (this time)

I haven’t posted in a long time, reason is actually very very simple. As a startup I’m getting really a lot of work, maybe even to much work. But you don’t hear me complaining, I’m really glad that I’ve got this much work.

One of the first investments I did was the purchase of a 24″ TFT screen. I have to say, It really improvese my coding speed. In a couple of months I’ll buy a second one for xinerama!! I’ll take a picture when I’ve build the setup, but it really is true that you work faster if you have a larger image to work with!

Next week I’ll be attending javapolis, one of the biggest (if not the biggest) java event in Europe. I’ll be going the thursday and friday as I don’t find the wednesday interesting enough, give me a shout if you’re also going! I’m always interested in talking with other ‘geeks’.

Hope I can get some free time during the christmas period to work some further on my mono topreader project as I really want that getting into a usable state.

Topreader Desktop Development

The last couple of days I’ve been doing some hacking in Mono/Gtk#. A year ago I created a small patch for liferea, I wanted to create some more patches but the damn thing wouldn’t build on my ubuntu box. I asked the mailinglist but the reaction was that they hadn’t gotten a clue what could be the issue. Now it is a default installed ubuntu box, no special thingies, just apt-get install gnome-devel, that’s it.

So I had 2 options, find out why the hell the autotools was crashing or start writting my own RSS aggregator. Well stupid me chose the second option.

You might ask Why?
Well actually very simple I wanted to do some heavy dutty development to get back into the gtk libraries. As I want to join in on the tinymail development somewhere in the future …
Secondly it had been more than a month that I did any c# development. So I created a simple project in monodevelop, took the 2 defacto standard rss and atom dotnet libraries and started hacking.

Where am I now?
Well I have a TreeView on the left with my rss feeds, I have a TreeView with all the unread items and I display the unread Items in a WebControl (firefox embedded). The feeds that are in my TreeView get checked for updates every 3000 seconds. If you click an unread item it doesn’t get displayed anymore. So basic viewing capabilities are getting there. ๐Ÿ™‚
view the screenshot

How?
If I’m not mistakend liferea didn’t use a database, I instead decided to implement it using a sqlite3 database. All the folders,channels and items are stored in it. I have to say I really was amazed by the speed of it.

What’s next?
Well a lot has to be done but what will happen in a few days is the ability to add folders and feeds from the gui.

Long term goal?
Well very simple finally get the rss aggregator I want, all the aggregators I’ve tried all had some nice features but none of them combined the ones I want. The scratch your own itch thingy ๐Ÿ™‚

The name?
TopReader
What? TopReader?Wtf? Well since a few weeks I’m self employed and the company name is TopCoders so … ๐Ÿ˜€

Freenx font issue

As I mentioned earlier I’m experimenting with freenx, it works great but there was one issue my fonts weren’t great, the i and the l were sometimes missing what made it difficult for reading some sentences. I set it up on another machine and this didn’t have that phenomenon so I went on an investigation.

The machine I had the issue on was my laptop, I made some alterations in the fonts to give me a nicer user experience. It seems that because of these settings the font issue appeared. It’s one stupid setting and you don’t notice it when you use it on your pc but freenx seems to have problems with it.

In the font menu
font menu
You have the subpixel smoothing (for LCD) enabled you will notice this strange behaviour if you select best shapes it will render pixel perfect ๐Ÿ™‚

Swing Labs (who sais java swing was dead?)

As many java developers I heared about the javaone session about the swing makeover. Today I stumbled upon Romain Guy’s entry on it. You should really download this quicktime movie and watch it (24 mb). If your not that java lover, do check it out as it is a makeover about a mail client and I really like the new features they add to the mail client.

Hey philip, can’t you implement this in your framework 2? It would be nice if all the mail clients will do this in the future!! Who knows if my current projects are finished, maybe I’ll implement it ๐Ÿ˜›

Prime Potter

Well we always accuse the prime minister of the Netherlands to look like Harry Potter. If I can remember some flemish pollitician even called him that.

Well with the events of yesterday I propose we should call our own prime minister Harry Potter. Our country was 900 million รขโ€šยฌ short, they sat down a couple of days and when they came out of their offices they had managed to magically get more than 900 million รขโ€šยฌ. Could you do the same to my bank account pease ?! ๐Ÿ™‚

I’m really interested at how we will notice this in our dailly lives! Both as a consumer and as a self-employed person.

Freenx

Yesterday after a big meeting I still had some technolust in me so I started experimenting with freenx on my ubuntu dapper box. I have to say, RDP fuc* of* ๐Ÿ™‚

Really, If you want to use a remote desktop and are on a small bandwith uplink (I wouldn’t call 1mbit up very small) you should really check this out. I tried vnc and rdp on this connection and beleive me freenx really kicks the ass out of both of them!!

Another nice feature about freenx is the fact that you can disconnect and reconnect on another computer (a feature I tought only windows had, guess I was wrong). So no I can leave my desktop open and reconnect from almost anyware.

Even surfing usering firefox is really like network surfing (maybe even faster)