Tuesday, January 26, 2010

Visual Studio 2010 Beta2

Today I wanted to create a simple tabbed web browser in C# using Visual Studio 2010 Beta2 and guess what? I remembered why I didn't invest time in learning the IDE's functionality or C#, the IDE sucks big freaking time.
Few minutes ago my PC rebooted when I've closed Visual Studio, this have never happend, my PC is very stable and does not reboot just like that...
I know that it's a beta and all that, but come on! while I was using form designer at one point when I was switching between code and designer I coulden't design the form anymore because of unknown VS problem.
At this time I am very happy that I've learned Delphi, even though the IDE has some problems, at least I can design my form, damn!
Anyways this post is a message for Delphi developers, DO NOT QUIT DELPHI it has way more to offer than VS, hopefully Embarcadero will lower the price on Delphi so that small companies can afford to buy 5-10 licenses or Delphi will go down the drain...
Delphi is truly R.A.D. while Visual Studio is truly a pain in da azz.

Here are two classes, one in C# and the other in Delphi
class VisualStudio
 public VisualStudio()
  MessageBox.Show("Dude leave me alone, I am too crappy!");

 Delphi = class
  constructor Create;


constructor Delphi.Create;
 ShowMessage('I am not dying VS, it''s just the end of your beginning');

Click here for some interesting stories about VS problems.

Sunday, January 17, 2010

Project management

I would like to write a few words about project management, note that I'm not a certified manager in any way and that you can contradict each and every word I write as long as you have arguments.
Whenever you start or join a new project you should keep in mind that you must be very organized about what you do and how you do, a list of things you should never do:
1. do not write code just to make stuff work, make it as elegant as you can;
2. do not write lousy identifier(variables, classes, constants, methods, etc.) names, by lousy I mean that the name should specify it's scope;
3. do not write anything without a comment unless it's something very simple that doesn't need comment, i.e. aVariable := aValue or aVariable := TSomeClass.Create;
4. try do avoid long method code, if you have a 30-50-100 or more lines of code in a method(procedure, function) it can get confusing trying to understand what goes down, not to mention point 2. or 3. that would make you wanna scream like a little girl;
5. oups! project needs updates or modifications, make sure you understand everything you need to do before you start, ummm... wait! I have to fix bugs made by other developer(s), how would you feel if they haven't done anything I wrote in points from 1. to 5.?

And now a list of arguments, each point is a reference to above list:
1. if you write code just to make stuff work, I would like to see you struggle to understand what "da' heck did I wrote here...?" or other developer(s) would probably hang you :)
2. lousy identifier names is one of the best way to make other coworkers want skin you alive, i.e. think of a methods that has this variables sData, iW, iH, are this logical enough to understand their scope? how about this: strData, intWidth, intHeight? depending on the code convention you have with coworkers or boss;
3. I have a unit with 2.000 lines of code written by me(or not) about 5-6 months ago, no freaking comment, no nothing, and have 2 days to get a task completed, what da' heck should I do? at this point a drink would be the best choice!
4. another problem would be a long code that do not fit in your screen, I mean you cannot see the entire method code without scrolling, this can have sever consequences you'll see;
5. if you're afraid to ask the team leader or coworkers about what exactly you need to do, then my friend you have serious issues, understanding your tasks is a must, even though you have big experience as a programmer, it's still wise to understand your tasks.

From what I saw(until now) most developers(not necessarily Delphi developers) tend not to respect the above mentioned, let me tell you what happens:

You get project(at first you do not know how big it will be, no one knows, not even the investors) you start writing messy code, it's Okay you just started, there is time to fix anything, you wish to make a good impression by "making stuff work fast", time passes, you get paid, everyone gets paid, now 1-2 years have passed, you project is a mess -- no one thought that it will take so long but everybody is happy that it did -- now when you look at your code 20-40-60 thousand lines of messy and poor commented code, you just want to scream like a little girl and run to mommy, but you forget that everything is because of your poor management which(from my experience) it shouldn't take more than 1 hour for 8 hours of work to be done and in 1 to n years you don't need to go to mommy or abandon project.

Wednesday, January 13, 2010

Contest update

Here is quick update on the contest(click for link):
- You must provide full source code, if you use dynamic link libraries(dll's) you must also provide the source code of the dll;
- Every contest entry will be publicly available;
Because there are a lot of people participating in the contest(according to traffic) the prizes will be as follows:

1st place: a 4GB memory stick and a customized T-Shirt
2nd place: a 2GB memory stick
3rd place: a customized T-Shirt

Note: that the prizes will be sent via priority post to your door(with all taxes paid).

Tuesday, January 12, 2010

delphigeist info

From now on delphigeist can be accessed via http://www.delphigeist.com/ or www.delphigeist.com or delphigeist.com.

P.S. I wish you good luck on the contest, over 380 programmers interested in contest this will be tight!

Delphi Distiller v1.85 released

For all of you that don't already know, Delphi Distiller v1.85 has been released.
Delphi Distiller homepage(click for link).

New in this version:
+ Delphi 2010 Update 4/5 unprotected permanently.
- To make things less confusing, Delphi 2010 Update 2/3 is not supported any more.

CRC32: 828E10E0
MD5: 207992917fbd49d5fcb05d74f4d63d00

Click this text for direct link to the torrent file(link to IsoHunt).
Information about Delphi Distiller v1.85 on IsoHunt.com can be found via this link.

Reversable sorting algorithm CONTEST

Most of you guys out there know a few things about sorting, there are lots of sorting algorithms and from what I know Quick Sort is the fastest.
More information about sort algorithms can be found on Wikipedia(click for link).

As you know a sort algorithm can sort an array of bytes/chars/integers/etc. in ascending or descending order, but what IF I wish to sort a array of bytes/chars/integers/etc.(of variable length) in any order(ascending or descending) and store some information that helps me restore it to initial state?

Contest rules:
- Develop a sort algorithm which sorts a array of bytes/chars/integers/etc.(in ascending and/or descending order) which stores information that helps you restore the array in initial state.
- The sort information must NOT use more than half the size of the array(i.e. we have a array of bytes of 4096 elements, the sort information must not use more than 2048 bytes)
- If you use code written by other people you must enter a comment before the code in the source code(i.e. this code is created by AUTHOR NAME|link to website on next line the code appears).
- The algorithm must work on any number of elements in a array

The application/unit/source code must be sent to me at this e-mail address: duminicadorin{AT}gmail{DOT}com(you can send me e-mail if you do not understand any of the above rules -- comments are also welcomed).

The winning code will be the fastest algorithm or the algorithm which stores information about the sort in less space.

1st place: a 4GB memory stick and a customized T-Shirt
2nd place: a 2GB memory stick
I will request your address in order to send you the prize IF AND ONLY IF YOU WIN 1st or 2nd place.

NOTE: that the contest ends Friday on 22 Jan. 2010.

Blogroll(General programming and Delphi feeds)