Software development testing…

Last week at work I went through some software testing on expert systems and I really want to share my experience!

At the beginning I thought it will be boring but I was totally wrong!

It was amazing, enjoyable with a very sophisticated way, I don’t know whether the result was by the designer of the test or if there is a standard template for that and I don’t really care…

What I do know is, if you ever have a chance don’t waste it… (This was helpful for my final year project which is next year, more about that another time.)

input data -> Algorithm command -> expected outcome -> diff command and so on…

Even testing needs programming skills, we can’t live without you…

Monday, August 10, 2009   ()

Relaunch in Cocoa touch?

Yeah… Relaunch command doesn’t exits in Cocoa so there is no way that Cocoa-touch will have one and Statistique (The upcoming iPhone app) requires relaunch if you try to free-up the memory due to the allocation of static variables.

So, I had to write my own piece of code that will do that for me and this was a breakthrough…

How can you do such a thing when the bundle path differs from phone to phone? when NSTask doesn’t exits? and system() is ignored?

Ha, there is always a way to do whatever you want, all you need is keep trying…

Enough chatting…

How? Using UIApplication with openURL method and I am not kidding.

Setting your application to have a certain URL. Google it you will find plenty of information out there. CFBundleURLType and CFBundleURLSchemes set them let’s say with the name “stat”.

All you need to do to open your application is:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”stat:”]];

This will launch your application. So on how to restart, is pretty obvious but it doesn’t work. You need to add one more line

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”http:”]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”stat:”]];

Just use the above code, first call a url to open safari and then to open your application. Safari won’t even be displayed so there is nothing to worry about. ;)

Sunday, August 9, 2009   ()

iPhone SDK 3 means trouble?

Is not been too long since I got my hands on the iPhone SDK 3 (like 2 months ago) and I have to admit is well designed and the familiarity with Cocoa is huge. Custom graphics are slightly different compared to Cocoa but still is fun and the methodology remains the same. Plus Xcode is a bit buggy but Apple will fix everything sooner or later.

My point:

This post really is a complain… Why Apple removed the NSTask.h object from the foundation framework? NSTask is really powerful, it can pipe in an out simple and fast. Is there a reason why? Anyway, let’s keep moving…

At the beginning I was shocked cause I really wanted to execute other unix built-in commands like “df” and so on… Still Objective-C is very powerful since I can use C code to do my stuff…

In C, I am aware of 2 different ways to execute a command, one is using “system()” and the other one using the “exec()”. I thought that it would be easy but nop. It wasn’t… The iPhone completely ignores both commands… really frustrating…

If anyone has any clue on how to… Please amuse me…

Sunday, August 9, 2009   ()

A conference - a challenge…

During this amazing year that I had been working on the Earth and Planetary Remote Sensing (EAPRS) laboratory, I realized that programming skills are not that important. That everything is possible and all you need is motivation to keep trying.

Yeap, I made a research and you know what?

The final piece that came out, made me think that programming is there just to show something or moreover prove something easier, faster and much more accurate.

So I came to this point…Do I like programming for the code or the outcome?

This easy answer is both but is not true at least for me. I think I really like coding and the reason why? Is that even if I write a sample code and is working perfectly, I will spent twice the time to find out if there is a shorter version of the exact same code.

Nevertheless I have to attend at the european space agency (esa) conference during November in Italy and the excitement that I have is beyond any exclamation point…

Sunday, August 9, 2009   ()

Freeware - Cheap - Expensive…

Is one of these rare moments, where I am getting really frustrating about software development! Sometimes I wish that I was a billionaire and I won’t need to charge a single penny for my software for the rest of my life.

Reason: I am not developing to make money, I develop just for fun. I love spending my free time to code, get nervous or have headaches and try to understand what the problem is and blah blah… It’s like my second life, where the outcome depends exclusively by me.

Then why do I charge my iPhone apps?

Well the answer is simple. Users are insane! (No offense) There is a huge percentage that actually judges a software from the price tag. God I hate these people… On the other hand “Yes I think I am a programmer but not a designer” who is gone pay him? Me? I really doubt that…

I feel really bad for designers like Na and Thvg or even my beta-tester Andreas. They did excellent work with nothing in return. I wish I will be able to pay back somehow in the near future.

I could make my iPhone apps for free and use adverts to make money out of it. Yeah I know, ads built in an app.. I prefer to stop developing…

Money from donations? Another thing that really never worked out! How do I expect to make money from donations, while I’ve only donate twice in my life? (I hate my self) There are few people that donate so far and I am glad they did, is an extra boost for me.

Saturday, August 8, 2009   ()

Everything I’ve done over the years that’s worked out well—software, standards, writing — everything, without exception, was something I did for myself. I’ve done the other thing too: built things based on guesses about what people out there might want or need. Never worked, not once.

()

Statistique App…

I am so exited today and I’ll give you few more details for the upcoming app. You already know that Apple needs at least 3 weeks to validate and approve an application.

Fair enough… what’s the difference if it’s now or three weeks later… during summer nobody care so I won’t be vex this time.

Well today I’ll show the icon to buzz you ;)

statistique

I know my designer is damn good ;)

Saturday, August 8, 2009   ()

Quick replace in textfiles…

Well here is a handy piece of code, that you will definitely need in the future…

Assuming that you have a bunch of text files (like I do) and you want to replace a certain word with another one. Yeah is painful and almost impossible if the number of files is round 5000 :p.

Well they say if you have a terminal, everything is possible… you can’t argue with that!!!

So I had to write a small script that will replace the word “zero” with “0”. Guess what? My beloved Ruby had is own single line way…

ruby -pi -e “gsub(‘zero’, ‘0’)” *.txt

Fascinating right?

Saturday, August 8, 2009   ()

Dock Spaces Suggestion

()

iPhone Hellas Greek Radio

()