Friday, March 29, 2013

Delphi Revisited

So some recruiter from nowhere basically sent me a one-liner, he needs someone to: "Upgrade Delphi code from 3.0 to current version XE3."

XE3? I have not even heard of it. I have not even seen Delphi in this millenium. Delphi is like a ball: over the years it has kicked from Borland to Inprise to whatever and now landed in a company known as "Embarcadero". See its history here

Back then, in version 1... it was the best tool around to build Windows apps. Even Windows was kinda new back then. The hardcore C API was hard. This is what I mean. If every program must be written like this there will not be that many programmers out there. Visual Basic was the ground breaking alternative... alas, the language was the toy language Basic? Definitely a wrong choice if you ask me. Delphi was Pascal based, much better choice, and blazing fast. At that time, Java was a new untested baby useful for doing blinking applets. "Enterprise" apps meant CGI little programs. You probably have not seen a sad C compiler including thousands of lines of <windows.h>, among tons of other lines, I have. MFC is hard too. I am glad I don't have to do this for a living.

Microsoft hired the guy who created Delphi (and Turbo Pascal)... The .NET framework has shadows of Delphi all over the place.

Forward a couple years, most people don't need to make .EXE for Windows now. And, if you have to develop for Microsoft you use Microsoft Visual Studio... and put up with its new versions every couple years. Other products if there is such a thing would be hard to keep up. It is quite amazing Delphi is still alive after all these years.

The gentleman is as excited as I am about Delphi: See here

This latest XE3 thing even suppose make Windows 8 and iOS apps! (what abou Android)

Ok, Windows 8 is not Windows 3.1. It is not, gosh-I-need-to-get-out-of-DOS-to-go-to-this evolution taking place.

Objective C is so difficult so I welcome a new way to write apps for it... but is HTML5+PhoneGap a better choice?

Just like in late 1990s, I do not see need to write Windows .EXEs, especially I don't need Windows 8 wacky apps.. I think the world would continue to prefer web apps. Look, even Microsoft is doing web apps. Look at that Sky Drive thing. Microsoft Office is there! Who needs to make native Windows apps now?

Visual Studio Express can be downloaded for free. Java/Eclipse download is free. Even XCode is free... I am not sure who will pay for development tools now. Turbo Pascal was a winner because it was powerful (in its days) and cheap. I am afraid not many people will pay for Pascal these days.

Thursday, March 28, 2013

Death of the Windows desktop coming

Alarming Microsoft news... the end is near for the Windows desktop: See Why Windows Blue heralds the death of the desktop.

Microsoft don't get it. Look! Windows 8 is not selling hot. And there are more of that poor interface coming. Don't listen to your customer = the end is near for YOU. It really is the end of the PC Era as Microsoft is destroying itself. Arise the Mac... people will eventually switch. Face it, people love the IPhone (and not the wacky Microsoft phones, sales numbers says it all). People will eventually get used to the Mac as well (and would soon get over its wackiness like constant one menu outside the app you are running, and put up with the Finder). Arise Linux.. people will find soon embrace vi like their grandfathers than fool around with Metro. Nowadays, it is actually much easier to abandon Windows and install Linux (on your pre Winows 8 machine). Oh and Microsoft dares to make that hard with Windows 8. See here for details.

People will stick with Windows 7 until they can't use it anymore. I do not expect Microsoft's sales will ever go up unless they give desktop users a decent desktop.

Wednesday, March 27, 2013

Rainbow upon Washington

Rainbow flags waving all over the supreme court. It seems like DOMA is about to be overturned. It is a historic moment in America. You should see mentioning of this in future history textbooks. See here for some pictures and details (or just about any news site).

Candidates for future election had to make sure they announce now they support same sex marriage. The Republicans party who don't want to lose anymore now has to do whatever it takes to get some votes and start supporting it too. It seems like those who oppose it won't have even a slight chance to win. I do not know of a single candidate who loudly dare to not support it.

Articles upon articles have written to convince people to support it... the themes revolve around "government shouldn't decide who you can marry", and "Get Equal".

Why do people oppose it? They pull out the Bible and point to the few couple pages of the first book. Adam & Eve: one man, one woman. The only possible way to "go forth and multiply". (They do not find brother marry sister bothersome) Now, some people don't believe in the Bible so that argument is not valid. And for those who only turn to the first couple pages of the Bible... I'd like to hear what they say about the biblical but multiple wives of their favorite characters Abraham and Jacob, and others. Ok, if the purpose of marriage is to have kids... are we banning people who past their fruitful age to marry or those who can't have babies marry? Of course not, that's not a valid argument either.

"What if 3 men want to be married" asked Santorum and he got blasted for saying that in comparing marriage and polygamy. He got blasted on othing things too, he didn't win and you will probably never hear from him again.

If "Get Equal" takes place, the answer to Santorum's question is a resounding yes! Use this symbol if you like: ≡ Then why not 4,5,6,...n.

What kind of world do we live in if the family is gone and replaced by whatever-combo-you-like. Now that's liberty alright. Ok, marriage itself is failing. How big percent is the divorce rate now? (ok you can look it up yourself)

Oh let me remind you, same sex couple cannot give children that come from both "parents" even if you use surrogate mother and other methods. That makes it different. I am sorry, but same-sex marriage and opposite-sex marriage is not equal.

So one complaint was that when one of the same-sex couple died, the other one cannot inherit that money. Let's CHANGE that! So that you can leave your $ to anyone. But you don't have to change marriage to make that happen.

Tuesday, March 26, 2013

Speed of light constant challenged

I was kinda stunned to see this headline: French Scientists: Speed of Light not a constant. This is shaking a foundation pinning of modern science. Even the meter is defined by it. Ok, it is saying "vacuum isn't really vacuum", which I think most scientists can agree on. But if there is a vaccum, the speed of light is constant, ok?

Now, it is blazing fast of course, at 3x10^8 meters per second that is. During that sophomore year in high school I asked the teacher... if it is SO fast, how do we know this value? Can't measure speed with simple v = d/t, right? The teacher smiled, "It isn't so easy"... and pointed me to a location of the textbook containing the octagon mirror experiment. See here for some glorious details.

In science, we often give the ending first. Like we tell students speed of light runs at that speed without telling the story of how people originally thought light runs infinitely fast then calculated that value... We tell students the earth weighs 6x10^24 kg, but often don't tell them how to get this value (by calculating gravity with Newton's formula, google it to find out how).

A science book can be written like a journey of discovery... start with what you see: the sun and the moon and the stars, how I wonder what you are... don't give the modern view yet! Then tell how each piece of knowledge is discovered... point out some old wrong theories (and try not to laugh too hard). Unfortunately I know too little science to write this.

For the record, I never wonder what the stars are like the author of "twinkle twinkle little star". I don't get to see them. I live in a city with too much light pollution.

Monday, March 25, 2013

Windows Annoyance (part 8)

My handy camera makes .MOV video files. They play perfectly fine on the camera. Upload it to Windows 8. Double click on it and it launches the all screen Media player and boom it crashed! Try it on the old Windows Media Player (that does not jump out to Metro) and it plays fine. What's the deal? The same computer. Both are Microsoft programs. The "modern" one crashed, without even a meaningful error message. Waita minute, I was able to see files play on that before. Did it crash after some mandatory update that requires me to reboot?

Thursday, March 21, 2013

Windows Annoynance (part 7)

For a decade+, when you install something in Windows, you can find a link to what you just installed on the Start button menu. Alas it is gone in Window 8. You will need to jump out of the desktop, and scroll scroll scroll to the right and find it on the start screen. The icon has a lot of space around it too. Ok, for convenience I need it on desktop. Fortunately I can pin in the taskbar. But look, the taskbar is only so long and it is not nice to put too many things on it. Can I drag the shortcut out into the desktop? No. Can't do that.

This Metro thing really is an disaster.

Wednesday, March 20, 2013

Modern Javascript libraries

Javascript has come a long way. It used to be a tool to do simple things, such as giving you an annoying alert if you have not entered a required field (now that's considered a poor way to handle validation). Now there are compact powerful libraries that do things I didn't even think was possible before.

I've heard people talk about knockout.js and Angular.js. Going through the tutorials can be an entertaining experience. Basically these libraries let you do Model-View-Controller things all on the client side. Impressive! Of course, there is also the dollar-sign-everywhere jquery that just about everyone uses.

Ok, this can be debugging/programming nightmare if you forgot a $, and {} here and there, and there is some learning curve. Usually I prefer SIMPLE client side code. I prefer to sprinkle logs and invoke the debugger on a real language such as java instead of fighting javascript issues (that may or may not be available on that ancient browser you may be dealing with)... But the javascript libraries and crispy fast because no network trips needed.

See wiki's List of javascript libraries. There are so many out there.

Thursday, March 14, 2013

Harsh Windows 8 Verdict: It has failed

ZDNet gives a harsh report card for Windows 8 and plenty of reasons why it failed. See here: Five reasons why Windows 8 has failed.

Yikes, it has done poorer than Vista. While you are at it, read the "Metro is awful" link.

Now Microsoft, do you realize that you made some wrong decisions? (Fire the guy who pushed this interface) Are you going to say dude, at first people didn't like the mouse either?

Yikes your Surface isn't selling either. I'd LOVE to see a product that is even better than the IPad or the Android pads, but I didn't find the Surface is it. It is heavy and wacky.

Before you go into depression, let me tell you this: Windows 8 isn't doing well because Windows 7 was good... it got you back on track after the Vista failure. To fix Windows 8, LISTEN to your users, specifically ME:

  1. Give an option to go back to Windows 7 interface with Start button. Gimme Aero back. I am sick of flat colors.
  2. Gimme back the DVD player. Come on.
  3. LOTS of people wanted an option to boot right into Desktop. Give this option to people. Nobody needs the flipping tiles Start screen.

Thursday, March 7, 2013

French curves revisited

Go to a store that sells school supplies you may notice bags of tools for architecture students. Ah, the 30-60-90 and 45-45-90 triangle. I know these special triangles since high school. (Are you able to tell why they are so special?) Come on, you know the compass and protractor. The triangular architect ruler is not for drawing, but for measuring. In modern times students probably all just go to the computer and not need to bother to draw by hand anyway. I am afraid that store won't sell a lot of these. But one curious tool is the French curve. I never knew where it came from. In real life, circles and lines just don't cut it... curves are needed. They are used to draw curves... but why that shape? I decide to find out.

Sure you can look it up too. Oh my it is based on the Euler Spiral. It is Euler again! Yes the guy who has a constant named after him: e, among many other things. Look, this Euler Spiral is how people build curves for roller coasters and highways. Uh, I admit I am not totally understand everything about the spiral here. (Yikes I feel so uneducated) But you see those integrals? Calculus was here.

To the guy who dare to ask me: "Tell me one use of calculus." On that day I wasn't able to tell right away on top of my head instantly... other than, "it allows you to solve problems not able to solve without". Here you go!

Look at this graphical presentation. I am very impressed.

Monday, March 4, 2013

RPN as desk calculator

In case you ever need a calculator on a computer, there are so many to choose from. In Windows go to the trusty calc, and in Mac go to the dashboard). Your phone has one also... although the default android one kinda sucks.

If you have a Unix prompt you can go to the "basic calculator" with bc.

I live under a rock... I have heard of "bc" in Unix but not "dc"... the desk calculator. See here for details. Ooh this thing uses Reverse-Polish-Notation! I thought only old HP calculator uses that. I love it.... that's because you solve expression by evaluating as you would by hand... without all that parantheses... The rule is simply arguments first then operation. This "dc" even predates the C programming language. Oh you can do more than just plain old calculations. It gets a bit ugly.

Oh no...

This is some terrible news. Parents rushing to the hospital to deliver baby but both died in traffic accident... and now even the baby didn't survive. That guy with BMW hit and run... on foot. This guy better be caught.

You would think something terrible like this would not happen as there is some higher beings watching over you as you read them in children books. Unfortunately all I can say is... life is so unpredictable.

Careful driving please. Too many lives are lost everyday... and most don't make the news.