Showing posts with label Apple. Show all posts
Showing posts with label Apple. Show all posts

Monday, 14 November 2011

Homebrew, everything you need






I am a Mac OS X user. I like my OS and I love how I can install/remove applications just with a drag'n drop. But some useful programs can't be find and this could be very annoying. Command-line programs like netcat or sdl-config or chocolate-doom still haven't a Mac OS X package.

Thursday, 6 October 2011

Thank you

Thank you for NeXT and its codebase.
Thank you for the Macintosh, a real personal computer, wich does what a PC should do in 2011.
Thank you for iPhone.
Thank you for iPad, the "magical" device.
Thank you for creating this framework, giving me the opportunity to work as a Real Programmer in a Real Programming Language.
Thank you, Steve.

Tuesday, 5 July 2011

iPhone SDK Troubles: a missing feature in XCode 4

XCode4.0.2 hasn't got a "Search and Replace in Selection" tool. It's one of most important tools for some very boring tasks, such as adding a @synthesize to hundred of lines or using the same lines to initialize them with a [[NSString alloc] init];
I hope Apple soon adds it: I wouldn't to continue switching between XCode and VIM to replace some text!

Monday, 6 June 2011

A look to XCode 4


«Boss, we update to XCode 4...»


If you're an iPhone developer (or a Mac OS X one), then you're using XCode. Recently, Apple released XCode new version (4), introducing a lot of improvements. I list just the more "impressive" and useful.

Refactor

Refactor is one feature I loved in Netbeans and I'm happy to have (finally) on XCode. Select a class name or a class property, right-click and choose "Refactor": XCode will search that word, how and where is used and will replace it, saving a lot of time and boring debug sessions.

New Interface

XCode 4 comes with a new user interface. Still based on Aqua, it looks like iTunes and it's more "rational" and ordered. Even targetoptions are subdivided with a drop-down interface, making easy searching a specific option.

Embeded Interface Builder

The interface builder is no more a stand-alone program: now it's a "feature" of XCode. Clicking on a interface file it will open inside the SDK, showing all informations (connectors, widgets, ecc.) on right side.

Drawbacks - Heavyweight

Obviously, there aren't just good things: XCode 4 is an heavyweight program: on my Mac Book Pro it eats 173MB and slows down my system. It's no a so drammatic, but it's boring.


Drawbacks - New Configuration

Do you remember how you sign your App to submit it to App Store? Well, forget it. Now the procedure is totally changed. Somebody says there's from a long time, but I seriously don't remember it. I don't like the new way to configure build and distribution. Maybe it's better, but it's certanly very different: a "soft" way to learn it would be useful. A good step-by-step guide was written on Stack Overflow.

Drawbacks - Immaturity

XCode 4 comes with a lot of new features. New features means less tests. Less tests mean more problems. I have many examples: with XCode 4.0 was impossibile to upload new binary with the embeded Application Loader. It gives an error related to com.apple.transporter.util.StreamUtil.readBytes(Ljava/io/InputStream;)[B.
I downgraded it to 1.3 version (as you can see here).
Another one was some crashes. Another one is when you "delete" a file from class tree: it's really deleted. No hopes to recover it, neither looking in trash can.
Another one is the mysterious "removed references" in a project. I can't understand why, but almost all references were deleted on a project. VERY boring!


Drawbacks - Slow

Finally (and more important), XCode 4 is slow. Damn slow! And heavy as an elephant. It makes slow my Mac Book Pro 2009 easly. All system suffers this memory-and-cpu hungry program.

Conclusions

XCode 4 has some interesting features, but suffers its youth. Probably this is the main reason for maintain a link to XCode 3.x on Apple Developers site. I hope XCode will be optimized, because its slowness is its main drawback.

Monday, 18 April 2011

Nobody can choose how to trash



Today I read an interesting letter sent from Ted Evans of Techrunch to Steve Jobs. He said


Please give us garbage collection



When you say "garbage collection" you always think to Java, to its slowness and to its inefficency. I think, instead, about days spent to detect a memory-leak error, when I was near to the deploy deadline. Working with iOS is wonderfull, but can also gives you headache if you aren't enough careful. Useless to say, when you have to realize a 4000-rows-of-code in two days, it's hard to be "enough careful"!

Ok, I admit a garbage collector could makes programs slow. But if I could use it when I want and if I could dealloc objects when I want, I could realize a "slow" version in time. Slow as you want, but it will not crash because of memory overflow, segmentation faults, ecc.
In next version, with more time, I could analize the code, optimizing memory use and detecting overflows and errors.
So, yes: I would like a Garbage Collector. But activable only when I want.

PS:
Can you recognize the man on the "wanted" poster on this TechRunch article? Well, our prime minister (I am italian) isn't very admired in other countries

Tuesday, 23 November 2010

Chainsaw with Jigsaw

«Groovy!»
The Jigsaw Project is "java kernel"'s offspring: the idea of cutting off pieces from the JVM and from classpath to obtain a small "java kernel" able to download and install by itself all necessary packages and libraries.
We'll get Java with a 1M installer, no more. It will runs some small programs, such as a telnet client and clones of ls, cat, more, ecc. utilities. When you will create a Java application, the new JVM will automatically download all missing libraries.
I don't believe Jigsaw will resurrect the Java desktop, but there's some scenarios we must reflect about. In these days Apple is trying to integrate its desktop with its mobile solution. The Mac App Store and the iPhone App Store are similar ideas; the Mac Book's trackpad is the same multitouch device of iPhone's display; Mobile Me's services work as a glue between your different Apple devices. In this "extremely dynamic scenario", informations (e-mails, photos, music, calendars, ecc.) are always in your hand. Why no expand this scenario to applications? Why no expand this scenario to your copy and scores of Angry Birds, or your copy and save games of Rage, they'll runs everywhere, downloading just the necessary informations from the network? It's true you can't have a Crysis written in Java, but a «Monkey Island Series» yes. This concept of «Buy Once, Run Everywhere» could potentially kill a set of market stores (where's the difference between a PS3 and a XBOX 360 and a WII if a donwloaded game runs everywhere?) and makes me doubtful about this prospective. But there's some players that could be interested on platform indipendence.
I introduce you an example: I buyed "Diablo 2" some years ago for PC. Blizzard gives me the opportunity to dowload a version for Mac OS X spending no money. They did a good work and I appreciate its honesty. Porting a game is an hard work, but in Java is trivial. Game's world is moving from power-players to casual-gamers and casual games don't need high performances or fancy graphics.
Java Jigsaw Platform could be a big opportunity some years ago. Now, with this commercial pressure oriented to kill every kind of portability, I am non very confident that Java will emerge from desktop sea.

Monday, 22 November 2010

An interesting limit: for Mark->Steve, Ubuntu->Mac OS X

In an article reported on a italian website, I read an interesting comparison: can Mark Shuttleworth be the Steve Jobs Of Ubuntu?
It sounds like a provocation, but actually every Great Project (GNU, Linux kernel, Debian, Ubuntu, Slackware, KDE and even Apple and Microsoft) has a leader whom manages and guides all project's members. Debian had Ian Murdok; Slackware has Patrick Volderking; GNU has Richard Stallman; Linux has Linus Torvalds; OpenBSD has Theo de Raadt.
Steve Jobs is one of most famous CEO in the world: his keynotes are shows. He saved Apple from a deep hole (in 1997 it could be sold to Sun Microsystem) and transformed it to one of most powerfull companies in the world. Some "never-seen-before features" was already present in GNU/Linux (spaces - virtual desktops, e.g.) but with Job's personal touch, they become "new" and "amazing".
In FOSS (Free-Open Source Software) environments, Jobs sits on the Throne of Evil  once reserved to Bill Gates. With no doubts Apple's devices are much closed than other (iPhone is a small fortress); no doubts that an HTC with Android is more free and more open than an iPhone. But you can't classify Jobs just as "a tyrant", "a criminal" or "a shark".
Ubuntu is trying to earn space in the desktop market. It's a very competitive place, where command line is evil. I think Mark Shuttleworth MUST BE the "Steve Jobs of Ubuntu", a landmark for desktop developers and for desktop users. He's taking seriously this role since one year, with some revolutions on Ubuntu, such as window buttons on the left corner, Wayland to replace X.org and Unity instead Gnome Shell. This ideas have been criticized by Ubuntu comunity but their motivations sounds like a "zealot reaction", not as technical observations.
Mark Shuttleworth is becoming more influent. If his vision is right and clear as I hope, maybe Ubuntu could become more widespread. As every man, Steve Jobs has good things and bad things. But as a CEO, we must admit he's one of the best.
FOSS zealots must to understand that making Ubuntu more functionally, more actractive and less "integralist", will help the GNU/Linux desktop adoption. And if «Mark Shuttleworth will approach to Steve Jobs», could be a way to realize this dream (lim Ubuntu=Mac OS X).

Thursday, 11 November 2010

iPhone SDK Troubles - Web Services

«I'm sorry Dave. I'm afraid you have to write it by yourself»

Write a web service should be easier than implement a new protocol. The iPhone SDK is an endless source of surprises to me. I discovered there's no methods to encode a NSString in base64; no library to write easier data and HTTP headers; and just a small C-function to get a MD5 hash. Ok, it's enough to get an hash, but it's not well embedded on Cocoa-Touch.
Ok, I can still write them by my own. But I really can't understand how is possible a network-oriented platform as a smartphone doesn't have this basic functions. Do you think they're not "basic"? Well, Python and PHP have them as built-in modules. And on Android? I found the answer here.
Anyway, a web service on iPhone is just a NSMutableURLConnection, with HTTP headers setted with [theRequest addValue:@"text/xml" forHTTPHeaderField:@"content-type"], passed to a NSURLConnection.
But I will pass the night writting the other necessary functions.

Wednesday, 10 November 2010

Buy now your new iBrick!

Think heavy

A news from Ars Technica


I am (for work) a iPhone 3GS user. I like my phone, it works well and it has a large application store. ACTUALY I haven't troubles with my iPhone. But last Apple politics doesn't calm me down. When I bought my Macbook Pro I was convinced I could buy another PC after five or six years, maybe even more. I'm still convinced this is true, because Apple's tight integration between hardware and software is good. But his "tight integration" is becoming a hell on iOS devices.
Building a software good for a Mac G4 and a Mac-Intel isn't easy. Anyway, if I should have Mac G4, I will probably accept it's slower to launch a program than a new Mac-Intel. But a smartphone isn't a computer and it has a completly different "way of mind": when I compose a number, if I have to wait three seconds, I think something is going wrong; if I see a delay when scrolling my contacts list, then I think there's too many processes in background.

Apple forbids iOS downgrade to prevent users to pass to a jailbreakable version. I can understand this. But I can't understand how Apple can pretend that a user gently accepts to choose between a unusable "brick" or 500$ to buy a new iPhone 4. I can understand that supporting patches for three or four iOS versions (e.g. 2.x.x, 3.1.x and 4.1.x) to grant a unbreakable OS for different hardware isn't easy neither cheap. But these solutions aren't well accepted.
After the drop of XServe line, I expect more attention on its consumer products.

Monday, 8 November 2010

Adieu XServe

I'm sorry too, XServe
Another move from Apple. XServe, the Apple-based server rack, will no more shipped from january 31 2011. It's a big delusion. I always dreamed to work on a XServe with Mac OS X Server. I was so curious to test its power, the usual tight integration between hardware and software and its user interface.
Will Apple exit from the servers makert? I don't know: is still possibile "convert" a Mac Pro or a Mac Mini into a server installing Mac OS X Server and this document shows how to do. Probably, they're just cutting unnecessary hardware. But, as you can read, to have the same power of a XServe you need from 3 to 30 MacMini; obviously, a MacPro is a bit bigger than a XServe.
In few words, Apple admits its big-iron line is no profitable. Apple is great for the client, but sysadmins with really big requests, still prefer to work with IBM or SUN servers with GNU/Linux or Solaris. Well, «this is business» (citing Lance Vance).
But, let's reflect: a Mac Mini costs 600€ and it's ready to work out-of-box if you install Mac OS X Server. Ok, it's not powerful as a SPARC T3-1 Server or a "home-build" server with GNU or *BSD, but for a small company whom needs a mail server, file server and a SVN it's enough. With the same price you can purchase another Mac Mini as "backup unit". If there's a system fail, with Time Machine it's easy to restore all services in an hour. Ok, it's not enough for a medium or big company. But there are more small companies and some of them already use Apple solutions. Apple isn't interested to face IBM or Oracle on the big-servers battlefield. But these small companies, with 8-20 employees, can't buy (and aren't interested) on big-irons: a Mac Mini or a Mac Pro are more affordable than a Blade Server and easier to configure and to mantain than a GNU/Linux or *BSD.
So, is this the end for Apple's servers? Who knows? Market is a strange beast. Maybe we'll see clusters of Mac Mini; maybe Mac OS X will allow to "assemble" some Mac Minis into a single system; maybe the Mac Pro will become an "ibrid" (iBrid?) between a big client and a medium-sized server. Let's see. I hope we'll enjoy the show.