Friday, December 22, 2006

Found a job

I found a job!
I am working as software developer for EasyTime International.

I am not very good at describing, so I will let you watch a mini cartoon explaining the advantages of the use of EasyTime services.

The EasyTime software is already up and running, but it is in old asp. Now, the company decided to transfer the whole project into .Net. In order to do that, we will implement everything from the scratch. That will allow us to create a more flexible and solid system, follow and implement the requested by the customers features, have a better understanding of the total project.

One of the disadvantages of the old system is that it couldn't afford a company with more than 50 employees. With the new implementation we are going to overcome this limitation. This is very important bacause very large companies have already shown interest to the new version, before even installing the new server ;)

The company used to aim at Scandinavian customers, but lately has set up goals for Germany and England, and we are always seeking for opportunities anywhere.

Monday, December 11, 2006

Πώς να κερδίσετε 200.000€..

Ο zkeramid έβαλε ένα quiz. Μπορείτε να πάτε στο blog του και να το διαβάσετε.
Εγώ θα δώσω ένα μικρό hint.

Η "πόρτα" στην πληροφορική, δεν έχει καμία σχέση με την πόρτα του σπιτιού. Αυτό που σας νοιάζει, είναι ότι η "πόρτα" στην πληροφορική έχει σχέση με τον τρόπο επικοινωνίας υπολογιστών σε δίκτυο ή διαδίκτυο.
Όταν μιλάμε για "άνοιγμα πόρτας", μιλάμε για ρυθμίσεις που κάνουμε στον υπολογιστή μας, ώστε να του δώσουμε την δυνατότητα να ενώνεται με κάποιους υπολογιστές, με κάποια συγκεκριμένα προγράμματα, να μην αφήνει άλλα προγράμματα να συνδεθούν σε αυτόν κτλ κτλ.. Για όλα αυτά, υπάρχει κάτι στον πίνακα ελέγχου.. Κάπου εκεί κρύβονται τα 200.000€

Saturday, November 25, 2006

Hacker Puzzle

A friend told me about this Hacker Puzzle and I found it interesting enough to post it..

OK, it might/probably be very easy for people of our area,
but it's worth trying..

22 levels.. Good luck..

Wednesday, November 22, 2006

PocketPC application with WebService

After spending about 2 days of my life trying to create a PocketPC application that connects with a database through WebServices, I finally made it!

The main problem was that the articles/guides/how-tos that I found on the net, where misleading me instead of helping me. The reason is that some of them didn't mention to which versions they were referring to, and persuaded me to do things that I didn't have to.. So, if you are working with Visual Studio 2005 beta 2, there are some problems that I am not going to discuss. The same goes for VS 2003. What I am using and going to talk about, is Visual studio 2005 and PocketPC 2003 Emulator.

Below I am listing the steps you need to follow and the reason for each one of them. If you don't understand much, just follow the steps and ignore the reason :)

To start with, I need to have a webservice that contains at least a method that returns a Dataset. That dataset is supposed to be filled with a Table from a database.

Then I create a PocketPC project. I add as web reference the webservice to the PocketPC project and then I call the method.. Then I try to build.. Up to here, everything looks normal. But, there are several issues..

1st. The emulator doesn't have internet by default.
The problem is that the emulator considers the device being on hand and not on it's base. What you have to do, is go to Tools->Device Emulator Manager, select "PocketPC 2003 SE Emulator", right click and select Cradle. Now, the Pocket PC device is considered connected with the pc.

But, still that's not enough. You need to download a software the will allow the sharing of your internet connection with the the PocketPC Device (Emulator). This software is freely provided by microsoft, and it is called ActiveSync.

2nd. The Emulator even though is connected to internet, cannot access the webservice.
The problem is that the webservice is running at the localhost(your pc) and your pocketpc is trying to find it at its localhost(the pocket pc).. So, the problem is that both webservice and pocketpc are trying to communicate at localhost, but each one of them mean something different when they say localhost. To fix this, you should define at your pocketpc project, that the web reference that you are using is at your ip and not at localhost. That has to be done in two places. One is the properties of the web reference, and the other one is at reference.cs (at the constructor).

Then everything should work smoothly..
Hopefully :)

Tuesday, November 21, 2006

Get Date from DateTime in SQL Server 2005

Since I spent some time searching for that and I realized that it's not easy/fast to find the solution, I post it here.

Configuration.
SQL Server 2005 with a table that contains at least a DateTime column.
What you want to do, is to check a given date('21/11/2006') with the values of the DateTime column. The problem is that the column contains DateTime (which means Date and Time) data.

This problem could occur (occurred to me) when you implement a flight booking system. You have to save the flights with DateTime because you need the time as well, but when the user searches for flights, you need to create an sql command that checks the date entered by the user with the ones in the database, an ignore the time.

So, what I used is (almost) the sql below
 
string sql = "SELECT * FROM Flight where "+
"(CONVERT(char(10), DepartureTime, 103)='" + depDate + "')";

I recommend you to read the msdn article about the Convert function in order to understand what it's parameters do..

Monday, November 20, 2006

Je Vais Bien, Ne T`En Fais Pas

This is the next movie I am going to watch..

And that's only because of this..



And because it is French..

Sunday, November 19, 2006

html pre tag

As I was trying to create the previous post, I had a small problem. I couldn't copy-paste the code from Visual Studio to the blogger and keep the formating. The problem is that html do not keep the whitespaces, which are very important to make source code legible.

So, what I did, is that I copy-pasted the code, and wrapped it with a pre tag.
What pre tag does, is forcing the browser to preserve the format of your text.
A nice example and definition could be found here, and at the html source code of my previous post :)

Saturday, November 18, 2006

A simple algorithm

After Lipis's comment on my previous post about the words with shuffled letters, I thought it might be nice to post a simple algorithm for that.

The C# method below takes as argument a string and returns a string that contains the same letters but only the first and the last are guaranteed to be at the right position.

private string shuffle(string word)
{
Random rnd = new Random();
int index;
string temp = "";

int loop = word.Length - 1;

//loop the word without the first and last letters.
for (int i = 1; i < loop; i++)
{
//get an int from 1..word.Length-1.
index = rnd.Next(1,word.Length-1);

//add the char at this index to the temp.
temp = temp + word[index];

//delete the char at this index from word.
word = word.Remove(index, 1);
}

return word[0] + temp + word[word.Length-1];
}

With the definition I gave, this method is almost correct.
There are some known bugs but I didn't want to make the code difficult to grasp.
Now that the code is easy to understand, I can talk about the bugs and the solutions.

1. If the word is only a letter (such as 'a'), the method returns this letter twice.
The solution is to check the length of the word given. So after initializing loop variable, write:
if (loop == 0) return word;

2. There is a possibility that the word returned is the same with the one given.
As the length of the word increases, this possibility becomes smaller. But for 4-letter words, it's 50%. What one could do, is to check if the word about to return, is the same with the one provided, and loop until they are different.

Friday, November 17, 2006

Interesting..

I couldn't find if this was really a product of a research, but still, I find it quite interesting..

"Aoccdrnig to a rscheearch at an Elingsh uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and the lsat ltteers are at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit any porbelm. Tihs is bcuseae we do not raed ervey lteter by it slef but the wrod as a wlohe."

It's already very famous as I realized..
Some info could be found here.

Wednesday, November 15, 2006

I found out my problem

After talking with some friends and listening to the opinions of some people, I found what my problem is.

* I talk too much. Others get bored, others get lost, others think it's too deep, others think it's self-explanatory. The point is that I talk too much..

* I don't have a standard way/level of talking. I am trying to say something in simple words, and suddently I get excited and go deeper. Some other times I talk more professionally, and once in a while I start explaining in simple words, which might result in some of the above.

So, let's try a new approach..
I will be as short as possible..

Visual Studio 2005 Rockz!!
-- Great intellisense, Great debugging information..
-- And much more.. But if I start, nobody will follow :(

Tuesday, November 14, 2006

Should I change topic?

Thanks to Google Analytics I saw that there were many people that visited my blog yesterday. Then I checked at the comments and I realized that maybe they all had the same comment as Nikos: "Nice things, but I don't understand them"..

Maybe I am not very good in describing..
One problem is that I don't know how deep I should go and how much explanation on what I am saying I should give.
Another problem is that I am starting to be convinced that I am not very good in describing(maybe because of the first problem).

So, should I start talking about something else? I think I have made about 7-8 posts about programming and projects and most of the comments were something like "nice, but I don't understand"..

Maybe I can start writing about god. It seems more easy to grasp and discuss about it..

So, I don't believe in god.
There is no reason for god to exist. Reasons such as "how we were born/came to earth/evolve" can be answered by science.
I don't believe in miracles. They can or will be answered by science(and that goes to all miracles such as "I clinically dead and doctors said that only a miracle could save me, and suddenly I was alive!").
I believe in free will. If god knows everything, then he knows what we are going to do, so we don't have a free will.. That goes against what I believe for free will, so I don't believe in god(at least he shouldn't know everything:D)

I guess I will go back to computer science now.. I cried enough :)