Archive for the ‘work’ Category

Taking on the iPad

Thursday, January 28th, 2010

The Magical iPad

Yesterday Apple announced their latest creation: the iPad. It is a revolutionary multi-touch tablet, running the 75-Million-users-famous iPhone OS. However, the press was not so welcoming with the announcement, and this makes me wonder why. I do not want to sound like an Apple fan-boy now, but I want to take a look at the facts before judging the device too cruelly.

First, lets take a good look at the specs, and see what Apple has achieved here:

  • Size: 242.8mm X 189.7mm X 13.4 X — Incredibly thin. Try comparing this with equivalent Tablet offerings or netbooks.
  • Display: 9.7-inch (diagonal) LED-backlit glossy widescreen Multi-Touch display with IPS technology. IPS means greater viewing angle and the LED means more vibrant colours and brighter display at lower energy costs. We all know what multi-touch is, right?
  • CPU: 1GHz Apple A4 custom-designed System on a Chip Processor. Another breakthrough: when a company designs the software for its own processor, you can expect marvels when it comes to performance, optimisation and energy savings. How fast this is, and how it compares with Intel Atom it waits to be seen.
  • Storage: 16-64GB SSD Drives. By far exceeding in capacity the equivalent offerings in the netbook area. SSD comes expensive tho.
  • Connectivity: WiFi (802.11n), Bluetooth (2.1+EDR), and 3G (optional). Digital Compass and Assisted GPS (only on 3G models).

All of the above are packed in a very slick, thin, light, aluminium package. Don’t even get me started how bulky and ugly the existing tablets or netbooks are. Its also backed with iPhone OS, which has made miracles on the phone marked and revolutionised the cell-phone industry. Take a moment and think what was before the iPhone. Nothing exciting eh? The iPhone platform revolutionised mobile User Interfaces, and even with its shortcomings as a device, it is still the best you can get in terms of mobile web browser, media player and the vast library of applications.

Now, imagine having almost twice as much the processing power of the iPhone in a 9.7 inch tablet. Imagine the possibilities with multi-touch applications. When developers get the hang of the new Software Development Kit, I promise you that we are going to see some AMAZING applications. Also, lets not forget the price: 499$ for the 16GB wifi model.

Of course, Apple demos of the new iPad weren’t so polished. To me, iPad now is something like the 1st gen iPhone when it was introduced. A brand new platform seeking for acceptance, so it can give it a push for later. If you recall, the 1st gen iPhone had no 3G connectivity, no AppStore, no iTunes store, no nothing. Just the stock applications. Now Apple made a head-start with these applications, but the OS is still lacking behind: no multi-tasking support, the welcome screen seems kinda, no flash support empty and so on. But lets not forget that we are talking about a device that has not yet seen the face of the earth, we’ve just seen it on a demo. And I am positive that Apple is going to push an OS upgrade for these devices to make as much from it as possible.

However, the press was really harsh to device. It reminds me the post we saw on Slashdot a few years ago: Apple Releases lame iPod. Aw really? What is the dominant portable music platform now, eh Slashdot, with 250m units sold? Apple is the victim of the rumours that are created around “expected” devices. Their mysticism around new product in these cases comes like a boomerang, as people start speculating about new product announces and they expect something extraordinary. Well, reality check people: Apple is a company like any other. They can not build the perfect product, but they do their best to get one thats innovative enough out there. This does not mean that every thing thats being distributed as a rumour must be a part of the final product — so guys, please, do not get disappointed if “teleport support” has not made into the iPad. This is plain stupid.

What I really like about Apple is that normally they don’t get a product out that doesn’t just works. However, this means that sometimes they drop out features that 10-15% of the users out there might find useful, such as generic USB support or an OLED display. Also, lets not forget that Apple is a company, not the messiah, and they want to make money. Of course they are going to release an OLED version later on, or one with a Camera: but not before they make some money and cover some R&D costs before they do that.

To sum up, I think the problem here is that the rumours were transformed into a real product, even before the product was announced by Apple — hence, many of the reporters were disappointed by the fact much of the rumours did not make it into the real product. If you take the device and compare it with the rest of offerings in the same space, you will then see the amount of technology and innovation that they put in. Well, OK, yes its a large iPhone, but then again its much more.

I am sure that iPad will be a great success, and it will, in fact, revolutionise the way we interact with computers, not instantly, but it will sure have a great impact. For now, I’ll have to be patient another 60-90 days to get my hands on it!

The anatomy of the Cypriot Enterprise

Monday, January 18th, 2010

Having worked in several Cypriot businesses during the past few years, I came to notice a few unusual things happening. This post is a semi-humorous approach to talk about these issues using fake examples, without reference to real persons, facts or companies. Any similarities are purely coincidental.

First of all, when someone in Cyprus decides to start a business, they just do it (like the Nike motto). No market study, no business plan, no budgeting, no sales analysis and prediction. Nothing. You just go write a company in the registry and off you go. Of course, they don’t even hire expert people required to run these new business, they just assume that the people they already have onboard are suitable to run it — without any training whatsoever. “Ok lets just work for today, and tomorrow we’ll see”.

If you have lots of money to burn, and your idea is somewhat good enough, the business may have a partial success. It will start growing rapidly, in paces that you will not really control — since there is no business plan or structure within the company. Of course the management will go hire new “key” people, sufficiently ignoring the people who were already there. These new hot-shots (because in Cyprus whatever you say, you are) will try to enforce something they’ve learned in a business in a completely different sector (lets say they hired a new Sales manager in a Technology business who previously worked in dealing cars) in this new startup. Of course, as you’d expect, it will not work.

As the lack of clear vision still persists, you will commonly hear contradictory announcements throughout the year: “We will take over the market” and the next day “We are in negotiations for being sold”. Of course this not only destroys the morale of the people working for the company, it also pushes them to pursue other ventures, therefore they’ll start loosing employees. Someone with a business background will know that if an employee is good enough (i.e.: he/she does the work he/she is supposed to be doing), you don’t risk driving him away, as the replacement might not come as soon as you need it and on top of that you’ll have the extra cost of training. Keeping a good employee is a must. Well, not in Cypriot businesses. In their minds this will get translated into this: “No worries, we’ll hire someone new with half the salary! He’ll learn the business in no time!”.

If of course your business is souvlakia-making (barbecuing), this would be very easy and straight forward (although I am sure, every trade has its secrets). However, if you are in a business that requires expertise, training and know-how, this is not easy at all. Getting someone up to speed especially in dynamic, pressuring and understaffed environment is extremely difficult. Not anyone can handle this. And if you happen to become an expert in a field, instead of being a company-asset, you magically become a liability. Why? Because you want a raise, your salary is high, and your managers say that your job is relatively easy: Hey, you just type a few commands here and there, why should we pay you?

When a new employee is hired (if you manage to justify it, because you just type some commands in a terminal), there is no training. The management expects you to train the newbie and transfer all the knowledge you gathered the past X years working in the company, or from the numerous manuals you’ve read in a weeks time. Dude, first of all, I AM NOT A TEACHER, and secondly HOW ON EARTH you expect that to happen in a week? Working for the company is already hard, but you get on new duties that involve teaching and training as well, because the management can not spare any money for training — Why pay for that when we have a manual?

In the progress of getting a business plan, at the end of the year they ask the department heads to submit a budget. They don’t give them any information or targets, just the command “submit budget”. A simple question pops in your head instantly: “How am I going to prepare a budget if I do not know what I am budgeting for?”. Questions like “What’s your expected growth?”, “What are your targets of the year?” and “How much is the budget?” do not matter in Cyprus. You just have to prepare a budget, and if the management disapproves it, its your fault: why did you put so much stuff on it anyway? Budgeting in the real business world means projecting expected sales — How much money am I expecting to make in 2010? How much new customers will I take on? And from there, in a waterfall model, should fall into supporting departments: how much money you need to support this growth? But of course, what do I know, I am not a manager!

If you take a look at an organisational chart of a Cypriot company, half of the people will have the word “manager” in it. Everyone in Cyprus is a manager of some sort, even if there is no one left to do the real work. Everyone is an expert in something, and they don’t really consult their fellow coworkers because there is a growing envy between them: who is going to talk first to the Managing Director with a cool idea, because he has all the money and power and we must be friends with him. Of course, the issue with money & power is a society one, it just gets reflected in the company, but it is always funny to see people running around other people like faithful dogs.

Every request someone has in a Cypriot company is a high-priority one: if someone is dying but somebody else broke his hand, you should stop treating the dying man and go treat the one with the hand. Especially if the one commanded you to it is a manager, it overwrites all your existing work and priorities. And of course, you can’t say no, because then you’ll be under-utilised and ineffective. Naturally, this keeps happening even if a department ends up with 50 pending issues but nothing closed because of this priority and focus shifting, enforced by the all-knowing managers of the company.

After finishing this post, I think I understand why over 50% of the Cypriot population works for the government, they are fed up with all of the above!

New hosting place

Monday, November 23rd, 2009

I’ve changed the web host of my blog. I’ve switched from a shared-hosting server I had with some friends to my own private web server. Since I have the privilege of having a dedicated fiber connection to my home at Cyprus from Cablenet, I used my unused Mac Mini Core 2 Duo as server. Mac OS X is already a server-grade Operating System, no issues there.

Mac Mini is actually a good candidate for a personal server. It is fast, silent, and power-efficient (just 110W, according to Apple). I currently run MySQL/Apache/PHP (AMP Server). It currently hosts my blog and a private wiki/blog/calendar as a database of organizing all my PhD-related information.

Aw, it also keeps automatic backups, thanks to Time Machine.

Getting touchy with Apple’s Magic Mouse

Friday, November 6th, 2009

Magic Mouse on my Desk

I ordered the new Magic Mouse as soon as they announced it. I was longing to replace my broken Mighty Mouse (the wheel got too dirty it stopped working, and yes I tried the paper cleaning). It arrived yesterday in a cute little box (with batteries included!).

The normal pairing procedure worked out of the box, nothing fancy here (that’s what I love about Apple), and a new “Mouse” icon appears in your System Preferences panel. The big difference with the rest of the mouse out there is that there are no buttons. The whole mouse is a big touch surface. This might sound confusing, but its not a first with apple (Mighty mouse also had touch left/right click).

First of all, I liked the footprint of the mouse, its small and relatively thin, so you can carry it around easily. I have really big hands, yet it fits alright in my palm. The right/left click works as you expect: you click the left-side its left-click, you click the right-side its right click. Now, here comes the fun part: scrolling! When you keep your finger in the mouse surface and move it around, its scrolls 360 degrees with you. It replaces that small ball the Mighty mouse had (which was good, but a pain in the ass as it got dirty), with much bigger space to move your finger. The whole movement comes really natural, and you get used to it right away. No learning curve at all.

I also liked the “two-fingers swipe” gesture. It gets handy when you are navigating through a multipage document and again its really comfortable to use, as your two fingers are always only mouse, as I again used to for expose (show desktop). However, I believe that therer are a lot of possibilities and options on what you can do with a multitouch mouse, so I guess Apple might introduce new gestures later on (eg. keep two fingers pressed for a second for expose or something), or even do a twirl for refreshing a page in a browser. The possibilities are endless. I really hope that Apple opens up the API for this mouse, so developers can create gestures for their applications or listen to events generated by the mouse.

Overall, I am really pleased with it. It fits well with my Apple wireless keyboard. The only negative point is the price: 55 GBP for a mouse is a lot.

Hands on with the International Kindle

Wednesday, October 28th, 2009

Kindle

As soon as Amazon announced the International Edition of Kindle 2, I ordered one. After 20 days or so wait, the Kindle arrived. For me, as I live outside the US, the Kindle was a major curiosity. It was neatly packaged in a beautiful box, with a cute “Once upon a time…” tag-line on the side. My first reaction when I got it is that I was expecting the screen a bit bigger. I tried to peel of the instructions on how to set it up from the screen, but of course there wasn’t some there: It was the magnificent Electronic Paper display.

The first “disappointment” was that the Kindle shipped with a US power-supply, instead of a UK or even an EU one. Of course it charges from USB, but you don’t want to carry a laptop with you on holidays (ok, ok, a generic USB charger will do, but can’t I complain?). Once it booted, the 3G interface picked up signal and the Kindle was ready to be used for the first time. I registered the Kindle to my Amazon.com account, and a welcome letter was instantly downloaded.

I bought 1-2 books, and they were downloaded quite fast, they are ebooks anyway so no real hurry. The screen is excellent for reading, it is very sharp and big enough although I find contrast to be a bit poor. The battery life is just excellent. I tried the text-to-speech function, the voice is pretty understandable, but I don’t think I’ll use that. Something I really liked was the very good integration with the dictionary application. You navigate via the 4-way stick to the word you don’t understand, and the dictionary definition pops at the bottom of the screen with the explanation. Pretty good. Annotations are lovely as well, especially if you are reading a scientific paper or a technical book. Also, surprisingly, the web browsing is working. Of course, you have only access to Wikipedia, but that’s pretty good. Of course I’d love to have access to other news websites such as BBC or CNN, but I guess that would lengthen the roaming data bill for Amazon. Additionally, there are tons of free literature for the Kindle (if anyone cares, Greek are displayed fine on the Kindle), just googling “free kindle ebooks” gives you a ton of results.

Now the bad things. What I really don’t understand is WHY the Kindle book editions are as expensive as the paperback editions. Isn’t it cheaper to deliver e-books? Correct me if I am wrong, but you’re saving tons of paper + ink and transportation costs. WHY the Kindle books are at the same price? Additionally, there is no PDF support for the small kindle (native PDF support is in the Kindle DX, but no international edition yet). Of course you can use the free Amazon conversion service, but it messes up the images. The text is readable tho, but if you’re looking at scientific papers, diagrams are also a must.

Overall, I am pretty happy with it and I recommended it to anyone who is looking to buy an ebook reader. So far it saved me a lot of printing, as I just copy the article directly on the Kindle and just look at the diagrams in the computer screen. Oh! Don’t forget to also buy the Kindle’s leather case!

GSoC Kick-start

Monday, May 26th, 2008

This summer, as part of the Google Summer of Code, I will be working on a CSS Addin for MonoDevelop. This will include adding support for syntax highlighting, code completition, support for CSS schemas and creating a UI to assist in development. My plan is to
complete the infrastructure first (css parser, schema builder and so on) and then move on to implement the UI.

In order to make the whole process more interested and transparent, I’ll post a post every week detailing what I’m planning to do, and what I have completed. This will also be sent to a Mono mailing list for the Summer of Code.

Achievements:
N/A (yet:-)

Objectives:

  • Create a wiki page (or a google docs document) and prepare a timeline for the project
  • Bootstrap a MonoDevelop Addin
  • Implement the CSS Parser
  • Add syntax highlighting
  • Start investigating possible UI solutions by reviewing existing implementations. Note possible features on the wiki.
  • That’s it for a start!

    Good luck to me and you with your projects!

All done, more coming

Saturday, May 10th, 2008

Well, I’ve finished the exams! Overall I did pretty well, however the final results will need to confirm that. The boring part is over, now it is time for some real work!

I will continue working for the ANA Project, on the Functional Composition Framework, porting a classifier to the framework and evaluating the results.

Of course, I will start working on my Google’s Summer of Code project as well, to create a CSS Editor plugin for MonoDevelop. More of details regarding the project will follow, as soon as I get started :-) .

Aw, and I got a brand new Lenovo Thinkpad X300. First impressions: ultra light, solid, very fast and Linux powered!. I’ll dedicate a post for this, because I got a lot to write about.

Accepted in Google’s Summer of Code!

Tuesday, April 22nd, 2008

I’ve applied to Google’s Summer of Code this year for 3 organizations, and I was accepted on the Mono Project. The project is to develop a CSS editor for the MonoDevelop.

Summer of Code runs for 3 months, and the purpose is to develop an open-source program, after it got passed through a selection process. The best thing is that Google pays you for that :-) .

It is going to be a very exciting summer (with lots of work :-) .

Edit in TextMate (Mac OS X)

Wednesday, April 9th, 2008

TextMate editor is the right-hand for every Mac OS X programmer, designer and power user. Most of the times we require to put the whole folder into a TextMate project for easier editing, or open a log file for a quick look. In order to do this we have to open TextMate and then drag the folder into it, or drag the file, since most of the times weird files are not associated with TextMate (most of the times you don’t want them associated either).

In order to avoid this, and have a speedier way to launch TextMate with the file, I’ve written a simple AppleScript to do the above for me. I’ve packed it into an Application and dragged it into Finder’s menu-bar, so it can be available on all windows.

You can download the application here: EditInTextMate.app.zip.

Save the file anywhere you want (I’ve saved it into /Application/AppleScript), and then drag it on the Finder’s bar. Mine looks like this:

Based on: http://snippets.dzone.com/posts/show/1037

Java RSA Encryption: An example

Thursday, March 20th, 2008

I had to use asymmetric keys in order to finish a university assignment, and to my amazement Sun could not publish any examples of using RSA keys in Java, because they were restricted by one of the stupidest laws in existence: US Cryptographic Export Laws. After playing with the API for a little while, I’ve managed to figure it out, eventually.

So I’m writing this post for those who want a simple example on how the key generation and encryption process works using RSA asymmetric keys.

Just for introduction, RSA is an algorithm for public-key cryptography. It was the first algorithm known to be suitable for signing as well as encryption, and one of the first great advances in public key cryptography. RSA is widely used in electronic commerce protocols, and is believed to be secure given sufficiently long keys and the use of up-to-date implementations. For more information on how RSA works, please take a look at the relevant Wikipedia article.

In order to start using RSA cryptography in Java, you will need to generate a key-pair: a public and a private key. The public key will be used to encrypt the data, and the private key will be used to decrypt the data. Without the private key, the data can not be decrypted, therefore it is suitable in cases where the clients want to send the server a shared-secret key or authentication information, in order to use for a session (kinda like SSL/TLS does). Java, starting version 1.5.0, provides a tool in the API for generating RSA key pairs.

The following code demonstrates how to use KeyPairGenerator to generate an RSA key-pair in Java:

// Get an instance of the RSA key generator
KeyPairGenerator kpg = KeyPairGenerator.getInstance(“RSA”);
// Generate the keys — might take sometime on slow computers
KeyPair myPair = kpg.generateKeyPair();

This will give you a KeyPair object, which holds two keys: a private and a public. In order to make use of these keys, you will need to create a Cipher object, which will be used in combination with SealedObject to encrypt the data that you are going to end over the network. Here’s how you do that:

// Get an instance of the Cipher for RSA encryption/decryption
Cipher c = Cipher.getInstance(“RSA”);
// Initiate the Cipher, telling it that it is going to Encrypt, giving it the public key
c.init(Cipher.ENCRYPT_MODE, myPair.getPublic());

After initializing the Cipher, we’re ready to encrypt the data. Since after encryption the resulting data will not make much sense if you see them “naked”, we have to encapsulate them in another Object. Java provides this, by the SealedObject class. SealedObjects are containers for encrypted objects, which encrypt and decrypt their contents with the help of a Cipher object.

The following example shows how to create and encrypt the contents of a SealedObject:

// Create a secret message
String myMessage = new String(“Secret Message”);
// Encrypt that message using a new SealedObject and the Cipher we created before
SealedObject myEncyptedMessage = new SealedObject( myMessage, c);

The resulting object can be sent over the network without fear, since it is encrypted. The only one who can decrypt and get the data, is the one who holds the private key. Normally, this should be the server. In order to decrypt the message, we’ll need to re-initialize the Cipher object, but this time with a different mode, decrypt, and use the private key instead of the public key.

This is how you do this in Java:

// Get an instance of the Cipher for RSA encryption/decryption
Cipher dec = Cipher.getInstance(“RSA”);
// Initiate the Cipher, telling it that it is going to Decrypt, giving it the private key
dec.init(Cipher.DECRYPT_MODE, myPair.getPrivate());

Now that the Cipher is ready to decrypt, we must tell the SealedObject to decrypt the held data.

// Tell the SealedObject we created before to decrypt the data and return it
String message = (String)test.getObject(myEncyptedMessage);
System.out.println(“foo = “+message);

Beware when using the getObject method, since it returns an instance of an Object (even if it is actually an instance of String), and not an instance of the Class that it was before encryption, so you’ll have to cast it to its prior form.

This is a small introductory example on how to generate RSA keys in Java and use them to encrypt objects. I’ll follow up with a tutorial on how to use asymmetric and symmetric keys in order to have secure network communication in Java.