Portrait of the Sleep Deprived aka. locus blog

9Feb/100

Getting variables from a url NSString

About an hour ago I came across a question on StackOverflow about a nice way of getting the variables from a URL like "http://domain.com/action.php?var1=100&variable2=true". I don't really need that feature but I always wanted to investigate the NSScanner Class and even though the hour is quite late, I saw this was my opportunity to do so. So I went on to create a class that, using the NSScanner would perform the task.

The usage is simple:

URLParser *parser = [[[URLParser alloc] initWithURLString:@"http://domain.com/action.php?var1=100&variable2=true"] autorelease];
NSString *var1 = [parser valueForVariable:@"var1"];
NSLog(@"%@", var);   //100
NSString *var2 = [parser valueForVariable:@"var2"];
NSLog(@"%@", var2);   //(null)
NSString *variable2 = [parser valueForVariable:@"variable2"];
NSLog(@"%@", variable2);   //true

You have a look at the class and how the NSScanner is used in the source files below.
URLParser.m URLParser.h

Bookmark and Share
Filed under: iPhone dev No Comments
3Feb/100

The iPad, the future of the PC and the demise of open platforms part 2 (Nikos)

Right after Dimitris, i would also like to publish my thoughts on the iPad:

One week has passed since Steve Jobs presented the iPad to the World and during these 7 days a war takes place across discussion forums throughout the Web. The majority of users criticize Apple saying that iPad is not what they expected/dreamed. Some go even further stating that it's just an oversized ipod touch that offers no extra functionality (other than being the most expensive serving tray for coffee :) ). What do i believe?

Vision of a different Personal Computer

I believe that iPad it's one step closer to what Steve (and apple in general) had envisioned 25 years ago regarding the future of computing. And that in one year time, most of the guys who now mock it will own one and wonder how the hell did they perform 90% of their daily tasks before iPad's time.

Of course, in one year iPad 2 will be introduced and i will be writing a similar article defending the new device :) . But that's life (or Apple).

I might be exaggerating a bit. But to explain myself i have to lay some baseline thoughts. What is the problem with today's computing? Most people (and i mean the 85-90% of them) spend more time troubleshooting with software and hardware rather than using their PC to be productive. It's one thing to log in your pc and create a new document or spreadsheet while listening to your favorite tunes (that is being productive) and another to install spyware/antivirus software, let it update, restart, download new drivers, security patches, modify the registry, format every 6 months because the system is way to slow etc etc etc.

You should all agree that most users don't need this. What they need is terminals that make their daily tasks easier to do and why not, fun to use. Terminals that due to their closed architecture require minimal maintenance. This is where the iPad comes in.

It provides the best Internet Experience, the best Media Playback functionality, the fastest and most enjoyable User Interface, astonishing Battery Life, decent e-book reader capabilities and last but not least, the App Store and thousands developers throughout the world ready to start building the next killer app.

is something really mising? Should we care?

I don't agree that the missing flash player or the inability to produce 1080p video affect the target group that the ipad aims. My mother doesn't really know what a flash player is. She just wants to have easy access to her email, write a document and maybe (after hard training) book tickets for a movie. With her current notebook all of the above are just painful, boring procedures. In two months time she will just have to touch the screen. And not only that. I strongly believe that the ipad will inspire her to learn more. To explore internet, start using google to search the web and slowly become a computer literate.

I consider myself a power pc user. I have been a user for over 20 years, i have studied computer Engineering and am now in the IT Consulting business. Even I don't need more functionality from ipad simply because it will be just an extra device in my home. Programming, image/video processing and other serious tasks (like gaming :) ) will be still carried out on my macbook pro or my desktop PC (which is a dual boot windows 7/osx 10.6.2 hackintosh by the way). But when i want to relax and do basic things i will surely grab my ipad.

Users that will truly love iPad do not need the complexity current computers offer. Those who desire more can buy an aluminium MacbookPro. With 1000$ you get a really good looking, powerful, 13.3 inch, mac osx powered laptop. Spend 400$ more and get a blazingly fast 15.4 macbook pro. Or a 27inch iMac.

Are you kidding us? Is this Steve Jobs himself writting this article??

With the fear of being called a fanboy :) , i have to admit that in my eyes the ipad has 2 major drawbacks. No built in camera and no multitasking. The second i believe will be solved when phone os 4.0 is introduced. At least in some basic blend. Ipad's target audience does not need heavy multitasking. Just running Safari with Pandora and IM+ in parallel would do just fine.

But no camera?? Came on guys...why not? I could imagine my grandparents buying one just to learn how to make video calls with their grandchildren. To take it further on, with an iSight camera onboard, the ipad would substitute my macbook when i would be at home.

Instead of conclusion

This text came out to be more ipad supportive than i thought it would. Maybe this is just a reaction to all those who accuse Apple of not building a tablet that outperforms a Mac Pro.

iPad is the first Personal Computer for the masses and it will undoubtedly open a new market. And the fact that a similar tablet from Google running Android OS is expected in the coming months just makes things way more interesting.

Maybe after all there will be a salvation for the frustrated masses that have been using Microsoft PC's the last 15 years. Apple has shown the way, many will definitely follow.

Bookmark and Share
3Feb/100

The iPad, the future of the PC and the demise of open platforms

It's been almost a week since the iPad has been announced and the internet has flooded with posts about it. Who are we to stay silent on such an event. So here's what I think of the revolutionary tablet.

Not the best internet browsing device

for a number of reasons. Well the main one has to be it's lack of support for Flash. Packing a 1GHz processor, it now gives Apple no excuse. The iPad could run the Flash player easily but it doesn't for many reasons which have been mentioned by many others. And if the reasons should not concern the end users, the result must! How can they promote it as the best web experience when it can't render millions of websites (including some very interesting ones), many great online games and of course most of the video on the web. According to Adobe's CTO, Kevin Lynch, "75 percent of video on the Web currently is shown in a Flash player" [link]. And that is actually the first Flash Player penetration statistic I've heard that I believe. I actually believe it is an understatement. I would say more than 90% of useful video (think what kind of video you watch every day) on the web is shown in Flash Player. Even if we exclude YouTube from this, since it's supported on Apple devices, that's still almost all the video on the web that you can't watch in the "best internet browsing device".

Second is the lack of camera - for now. Well that certainly adds to the whole "web experience". Video conferencing in Skype, is part of my every day computer life and I would need it on the iPad, especially since the device does not encourage a lot of typing.

Last but not least, is its inability to multitask. It made me sad and maybe angry during the presentation when I realized that the device everyone had been talking about is not a computer. Its just a 10'' iPod Touch with all of its limitations except for processing power. How can I convince myself to buy something that has the power to be a computer but for some dark reasons chooses not to? For me personally, this is the second most serious drawback for the iPad, along with the fact that, like the iPhone, it's a closed and controlled platform. More on that last part later.

"Apple - iPad - The best way to experience the web, email, and photos" - At least I agree with the "photos" part.

It is amazing

overall. Tablets are not a new concept, but they where never something different. With the iPad, the whole tablet category finally makes sense. A tablet that is useful and different than any other computer. You can have it in portrait mode to read the news online, then you can flip it to landscape to watch a movie and do that for 10 hours according to Steve Jobs. You can interact with it in ways that we can't imagine yet. The multi-touch interface on such a large screen will possibly bring a completely new way of human-computer interaction (even more than what the iPhone did). Not to mention the possibilities for new types of games or entertainment apps in general.

Moreover, I really believe this is the best device to show photos to others. The display looks amazing and the interface is so natural. Enjoying my photo collection and sharing it with others is probably one of the main reasons for me to buy an iPad.

Even though this first incarnation of the iPad might not seem too appealing to most people, I believe that its next generations (possibly with a larger screen) will redefine how most people use their computers.

But it is quite scary

to be honest. I really left the iPad's greatest disadvantage for last - the fact that it is a closed platform. You buy a device that has the capabilities of a regular computer, but you are not allowed to use it as a computer. You are not given access to the file system, you can't install apps without Apple's approval, you can't even plug a USB stick in it and transfer a file! You can only do things that are in Apple's best interest.

Looking at this as an experienced user, I find it annoying and of course scary. At some level, I can't understand how Apple can actually get away with doing something like this. On the iPhone it made sense. It's a mobile device with limited capabilities and had to make best use of its limited resources. But how can Apple justify rejecting, say a Firefox app for the iPad? I just don't think they will be allowed to do it. This is a computer with a 1GHz CPU we are talking about here and Apple should not be allowed to impose such limitations to the platform, as much as Microsoft is not allowed to prohibit its users from installing Firefox or Safari in their Windows computers.

Now, from a developer's point of view, I just can't see how people will want to develop for a platform where Apple alone gets to decide what is approved and what not. Where you have to conform to their rules and change your business strategy and your software itself just because it conflicts with their interests. The truth is, the iPhone and iPad platform is very interesting to develop for - they are amazing, evolving, location-aware devices with cool features like multi-touch and accelerometer. In many cases, it is also very rewarding too. But as a developer, how much do I want to invest in something the future of which depends completely on the policies of a single company?

The verdict

is that in my eyes, this version of the iPad is just and oversized iPod Touch. The limitations are unjustifiable and I only hope they will be lifted in the future generations of the device. I see great potential in such a device, so I hope that some other company will invest what it takes to create a product based on an open platform (Chrome for a multi-touch tablet?) that can provide me with an experience that, so far, only Apple products provide. With the help of some healthy competition, I hope the iPad will evolve to what it's really made for - change the way we use PCs.

Bookmark and Share
3Feb/100

In your face, stupid!

TUAW had a post today about the new iTunes update. The biggest new feature of the update is that you can now save your password and purchase stuff with only one click. And the people over at TUAW rush to advise us fools to enable that feature asap and grace Apple with more downloads. I have highlighted these 2 sentences of amazing journalism below.

TUAW-ad

"You are stupid. Thank you for reading."

It's amazing when a big site like this shows its readers what it really thinks of them and what purposes it actually serves.

Bookmark and Share
Tagged as: No Comments
17Jan/100

Ohhh yeaaah!!

snow-leopard

Μετά απο 2 εβδομάδες δοκιμών, επιτέλους κατάφερα να εγκαταστήσω το Snow Leopard στο PC μου. Το "μαγικό" στην όλη υπόθεση είναι πως δεν χρησιμοποίησα κάποιο πειραγμένο distribution αλλά με τις κατάλληλες ρυθμίσεις και αρκετό διάβασμα έγινε εγκατάσταση απο το Retail cd της Apple :)

Το dual boot windows 7 x64/OSX 10.6.2 Snow Leopard είναι λοιπόν γεγονός και δυστυχώς οι συγκρίσεις αναπόφευκτες. Σε ένα αρκετά δυνατό pc το OS X πραγματικά πετάει και η επιστροφή στα Windows πέρα απο επώδυνη απαιτεί και κάποιον χρόνο προσαρμογής.

Tα specs του υπολογιστή είναι:
Asus p5q-deluxe
Intel core 2 duo e7400 χρονισμένος στα 3.95Ghz
5gb DDR2 800Mhz
Ati Radeon 4870 1gb

Στο www.osx86project.org (wiki και forum) υπάρχουν όλες οι απαιτούμενες πληροφορίες ώστε και εσείς να μπείτε στον κόσμο των (H)ackintosh.

photo1

photo

Bookmark and Share
10Jan/101

New kid on the block

3 χρόνια μετά την πρώτη τοποθέτηση του μετεωρολογικού σταθμού Νεας Κηφισιάς, προχωράμε σε ποιοτική αναβάθμιση του εξοπλισμού μας. Αγορασμένος απο το ebay με κόστος υποπολλαπλάσιο του Έλληνα αντιπροσώπου, ο νέος μας μετεωρολογικός σταθμός Davis Vantage Pro2 Wireless είναι πραγματικότητα! Ευελπιστούμε σε πιο αξιόπιστες μετρήσεις (ο Lacrosse είχε ένα θεματάκι με τις ελάχιστες θερμοκρασίες τις νύχτες με ξαστεριά και άπνοια) σε μεγαλύτερο uptime καθώς και σε εκτενέστερη συλλογή καιρικών δεδομένων. Πάντως ο σταθμός ήδη έχει κλέψει τις εντυπώσεις με την ποιότητα κατασκευής του αλλά κυρίως με τον ηλιακό συλλέκτη ο οποίος του παρέχει τροφοδοσία τις νύχτες εξοικονομώντας ενέργεια της μπαταρίας!

Ηλιακός Συλλέκτης!!

Ηλιακός Συλλέκτης


Σήμερα Κυριακή 10/1/10 :) , εγκαταστάθηκε σχεδόν στην ίδια θέση με τον παλιό σταθμό. Για ένα διάστημα θα λειτουργεί μόνο offline καθώς η Davis χρεώνει extra (και αρκετά τσουχτερά μάλιστα) το interface που συνδέει την κονσόλα με τον υπολογιστή. Μέχρι λοιποόν να συγκεντρωθούν οι απαιτούμενοι πόροι θα συλλέγουμε και θα παρατηρούμε μετεωρολογικά δεδομένα ενώ στα άμεσα σχέδια είναι η κατάργηση του Lacrosse και η σύνδεση του Davis με το site μας. Να σημειωθεί ότι ο Lacrosse αναζητεί ήδη νέο φιλόξενο σπίτι για να συνεχίσει εκεί τη λειτουργία του. Όποιος ενδιαφέρεται ας επικοινωνήσει μαζί μας.

Bookmark and Share
30Dec/090

Δεν πληρώνουμε Διόδια!!!

απο το www.diodiastop.blogspot.com

Bookmark and Share
19Dec/090

Ελληνικές επαρχιακές διαφημίσεις το 2010…

Απολαύστε!!!

Εμένα με γυρισε πολλά χρόνια πίσω, στα καλοκαίρια της δεκαετίας του '80 και των αρχών του '90 που περνάγαμε τα μεσημέρια ακούγοντας ραδιόφωνο στο εξοχικό μας στην Καλαμάτα.

Bookmark and Share
13Dec/090

Planted evidence by police officer in Greece

\Copied from www.tvxs.gr

Luckily for this student, a reporter from the Associated Press was nearby the place of his arrest and took these pictures that prove his innocence. For the record, the guy was in his pijamas, taking out the trash when the police officers arrested him for no apparent reason. Just notice how they plant the molotov coctail bombs in a backpack and leave it near him.

Bookmark and Share
22Nov/091

Το αφεντικό τρελάθηκε…

...και ξεπουλάει το βιός του. Όσοι βρείτε κάτι ενδιαφέρον επικοινωνήστε στα γνωστά email :)

Βιντεοκάμερα Canon HV20 (High Def 1080i)

http://www.digideep.com/imgdb/news/20060207-02-canon_hv20.jpg

Αγορασμένη απο www.katerelos.gr πρίν 1μιση χρόνο, πωλείται γιατί είναι ζήτημα να έχει χρησιμοποιηθεί πάνω απο 10 φορές. Σε άριστη κατάσταση στο κουτί της. Πρόκειται για high definition camera με τα εξής χαρακτηριστικά:
Sensor Size (in.) 1/2.7
Sensor Count 1
Gross Pixel Count Video 2960000.00
Gross Pixel Count Still 2960000.00
Effective Pixel Count Video 2070000.00
Effective Pixel Count Still 2760000.00
Progressive Scan (output)
Still Pixel Shifting 0
Still Resolution Dimensions Maximum 2048x1536

Review μπορείτε να δείτε εδώ: http://www.camcorderinfo.com/content/Canon-HV20-Camcorder-Review.htm

Τιμή 450€ και δώρο μία κάρτα μνήμης 2gb micro sd

Laptop Asus A6ja SOLD!!!

http://taiwan.cnet.com/sharedmedia/Computer%20channel/NB/asus/asus_a6ja/asus_a6ja_p1_02.jpg

Hackintosh Desktop
http://images.e-shop.gr/images/PER/BIG/PER.911132.jpg

Πρόκειται για custom made hackintosh που τώρα τρέχει OSX 10.5.6. Τα parts έχουν επιλεγεί για χαμηλή κατανάλωση ρεύματος και αθόρυβη λειτουργία.

Συγκεκριμένα:
CPU: Intel Core duo 1.66ghz T2300
Motherboard: Asus Mobile on Desktop με integrated intel 950GMA video chipset (Plus integrated ethernet, audio)
2gb ddr2 667mhz
250gb Western Digital Disk Sata
Dvd R/W
350W PSU
Apple Mighty Mouse and Wired Keyboard

Monitor Samsung 20inches SM205BW
http://ec2.images-amazon.com/images/P/B000F9SNIW.02._AA280_SCLZZZZZZZ_V35571741_.jpg

Τιμή 170€ για το case και 100 ευρώ για το Monitor.
Τιμή πακέτου 250€ και δώρο usb wifi adaptεr της netgear που δουλεύει απροβλημάτιστα στο OSX.

Μνήμες για Laptop
Samsung 2χ256ΜΒ DDR1 PC 2700 (10€)
Ηynix 2χ512ΜΒ DDR2 PC2 5300 (20€)

Διάφορα (προτείνετε τιμές)
Linksys WAP54G Access Point
Netgear 8port Switch 10/100Mbps
Ati Radeon x1600pro 256mb pci express
Nvidia 8600GT 256MB pci-x fanless

Bookmark and Share