Browsed by
Tag: apple

iProgrammering

iProgrammering

Det har vært interessant å følge Apples utvikling de siste 11 årene siden de slapp første versjon av Mac OS X. I 2001 ble versjon 10 (derav X) sluppet, og denne hadde en rekke forandringer fra tidligere versjoner. Apple opplevde en nedtur på 90-tallet og ønsket på et tidspunkt å kjøpe inn eksternt operativsystem framfor å videreutvikle sitte eget selv. Mange alternativer ble vurdert, men istedet for å velge for eksempel Suns unix-baserte Solaris, eller Windows NT (som faktisk ble vurdert ifølge Walter Isaacsons nye biografi om Steve Jobs) valgte Apple å kjøpe opp NeXT og deres NEXTSTEP operativsystem i 1996. De forskjellige Mac OSX versjonene, og senere mobil-varianten iOS, har en arkitektur bygget på BSD-Unix med et overbygg av proprietære teknologier. De siste årene har Apple åpnet og lagt til rette for masseutvikling fra almuen. Spesielt har en ny forretningsmodell hvor utviklere selv kan distribuere programvare for et verdensomspennende publikum gjennom App stores til en minimal investeringskostnad gjort plattformen interessant for nye grupper. Jeg ønsker her å nevne noen av aspektene jeg syntes er relevante, og som jeg har funnet interessante i min lille flørt med Apple denne høsten.

Plattform

Apple har to forskjellige programmer (som i opplegg, ikke software) for utvikling avhengig av hvilken plattform du ønsker å utvikle for. Prisen for å utvikle for for Mac OS X (desktop) eller iOS (mobile flater) er per i dag $99 per plattform. Dette inkluderer distribusjonsavtale igjennom respektive programvare-marked, ressurser på developer.apple.com som for eksempel tilgang til mange av foredragene fra utviklerkonferansen WWDC som video. Jeg har ennå ikke investert i en slik avtale, men har likevel hatt mulighet til å lage små programmer for både Mac OSX og iOS, og fått tilgang til masse ressurser, jeg har dog ikke lansert noen programmer. Utviklingsverktøyet XCode er tilgjengelig gratis til Lion, igjennom AppStore, og versjon 4.1 kommer med SDK for Lion og versjon 4.2 kommer med iOS5 SDKet. Med mindre du ønsker å benytte deg av fordelene med en utviklingslisens kan du programmere uten, og i startfasen kan dette være lurt da det kan ta litt tid å bli kjent med Objective-C og de respektive rammeverkene. Det er viktig å få med seg at for å benytte en fysisk iPad, iPhone eller iPod touch for å teste ut egen programvare trenger du en lisens. I iOS SDK-pakken følger det med simulator for disse enhetene (merk: ikke en emulator) og den har ikke mulighet for å benytte seg av de fysiske sensor-dataene som det kan være moro å inkludere i programmer på iOS.

Verktøy

Apple har laget gode verktøy for sine utviklere og disse er fritt tilgjengelig igjennom App Store. I Snow Leopard kom verktøyet som et ekstravalg på installasjons

platen, men nå som OS distribusjonen skjer gjennom skyen har også ekstra programvare blitt tilgjengelig for nedlastning. Fram til Xcode 4 var det i hovedsak to programmer du ville ha brukt i utviklingsprosessen: Xcode og Interface Builder. I dag er begge disse programmene bygget inn i Xcode 4 og det å skifte mellom kode-editoren og GUI-editoren skjer sømløst basert på hvilke fil du bearbeider. For Objective-C filer får du opp en god tekstbehandler som er godt integrert med dokumentasjonen, feilsøkingsverktøy og andre hjelpefunksjoner. Dersom du velger en xib-fil vil du få mulighet til å grafisk plassere brukergrensesnitt-enheter som NSTextField, NSLabel og NSSlider. Xcode tar seg også av kompilering, versjonskontroll og fra og med XCode 4.2 kan du også legge ut forskjellige view i iOS applikasjoner ved hjelp av Storyboard. I tillegg kommer utviklingspakken med et godt analyseverktøy kalt Instruments og et morsomt og kreativt verktøy kalt Quartz Composer.  Sistnevnte benytter et visuelt grensesnitt tilsvarende de som finnes i Max MSP og Pure Data.

Språk

Selv om du kan programmere i mange språk på Apple plattformen er det foretrukkede språket Objective-C. Dette språket startet i utgangspunktet som et objekt orientert klasse bygget på C, men har i dag en lang tradisjon og er i versjon 2. Språket har mange likheter med andre C baserte språk, men har en ganske annerledes syntaks når det gjelder å kalle metoder hvor de bruker noe så utradisjonelt som square brackets. Noe jeg hadde problemer med å forstå når studiene krevde at jeg arbeidet med C var viktigheten av kompilatoren til å kunne utføre oppgaver ifra funky syntaks. Etter et par måneder med objective-C kan jeg lært å se viktigheten av dette. For eksempel lar Objective-C deg autogenerere get og set metoder basert på synthesize i implementeringen og property i interfacet.

[code lang=”objc”]

#import "SessionController.h"

@implementation SessionController

@synthesize user, sessions;

– (void)viewDidLoad

{

user = [[User alloc] init];

sessions = [[NSMutableArray alloc] init];

Session *s = [[Session alloc] init];

[sessions addObject:s];

}

[/code]

Jeg har ingen intensjon om å fortelle så veldig mye om Objective-c, men det virker som å være et morsomt språk å kunne. Det finnes i dag mange halv-gode og noen gode løsninger som lar deg programmere for flere plattformer uten å måtte kunne hver plattforms egne språk og skikker, men jeg syntes det har vært en lærerik opplevelse å forsøke å få hodet rundt Objective-C. For meg, som hovedsakelig har arbeidet med Java, er det vanskelig å fatte den dynamiske naturen til Objective-C: ikke bare kan du sende hvilken som helst datatype igjennom id-signaturen, du kan også kalle ting igjennom stier og laste inn ny kildekode mens programmet kjører.

Rammeverk

Rammeverkene er det som skaper mye av det som kan gjøres på en plattform. Det er her Python får sine “batteries included” og funksjonaliteten plattformene blir realisert. Skal du tegne grafikk eller initialisere en datastruktur basert på et XML HTTP-svar eller mange av de andre hverdagslige eller spesielle oppgavene som kreves av et program er det kjekt å kunne stå på skuldrene til noen som allerede har gjort tilsvarende oppgaver. Xcode kan linkes mot et stort antall rammeverk, men noen brukes mer enn andre. I første rekke kan det være greit å lære seg Foundation og et eller begge Cocoa-rammeverkene (Cocoa for Mac OS X og Cocoa Touch for iOS). Dokumentasjonen til disse, og andre rammeverk, er bygget inn i XCode så ved å holde inne alt og klikke på et metodenavn dukker denne opp. I tillegg vil rammeverk som er linket til fra headerfilen automatisk bli inkludert i auto-completion, og siden kodehintingen er god vil du med kun begrensede  kunnskaper om metodenes navn kunne gjøre ganske mye i XCode.

Hvordan begynne?

Hvis du har en mac er første steg å få tak i siste versjon av XCode. Gå inn på i App Store for å laste denne ned. Installasjonsfilen er stor og dette tar derfor litt tid, men benytt tiden til å gjøre deg kjent på developer.apple.com. Her kan du finne mange artikler, APIer og introduksjoner til forskjellige Apple teknologier, og dette kan være et greit utgangspunkt. Her finner du også artikler for nybegynnere som skal starte å lage sin første app samt best practices, rettningslinjer og demonstrasjonsapplikasjoner.

Lykke til, og si gjerne ifra om hvordan det gikk!

Bildet Big XCode er laget av Lee Gillen og gjort tilgjengelig på Flickr under en Creative Commons lisens.

Thank you, Steve

Thank you, Steve

As an unapologetic Apple fan I’m saddened to awaken to the news of Steve Jobs’ death. A great and innovative leader who I just knew through his texts, keynotes and products. He revolutionised the home computing with a ethnocentric focus on computers and found new use of technology in home computing with the introduction to the market of graphical user-interface, digitally created motion pictures, digital mobile music player, touch phone, and other big and small revolution that in the long run changed our digital world into how it is today.

Jobs founded Apple computers in 1976 together with Stephen Gary Wozniack and Ronald Gerald Wayne, and soon released their first computer, the Apple I, and the preceding year their popular Apple II was released to the market. From a field trip to XEROX’s Paulo Alto Research Center (PARC) where Jobs discovered an early from of a graphical user interface Apple brought this to the market and made it available for a, then very new enterprise,  home computing.

Later, after Jobs was pushed out of the company he once created he went on to found Pixar, after buying Lucasfilm’s computer graphics group in 1986. This company went on to make the first computer generated movie, Toy Story. At the same time he established NeXT. In 1996, NeXt would be acquired by Apple and job would once more work for Apple, and in 2000 he became CEO of a new Apple, who he helped grow from being in a technological and organisational turmoil in the mid-90s to become a major, if not the major technological company fifteen years later. Apple expanded from being a computer company exclusively, but by introducing computing, in a looser term, to other segments of the market, and more importantly, human lifeworld.

In August this year Jobs resigned from his post as CEO, a post he returned to after long period of leave due to sickness. In his press release he wrote (borrowed from TechCrunch):

To the Apple Board of Directors and the Apple Community:

I have always said if there ever came a day when I could no longer meet my duties and expectations as Apple’s CEO, I would be the first to let you know. Unfortunately, that day has come.

I hereby resign as CEO of Apple. I would like to serve, if the Board sees fit, as Chairman of the Board, director and Apple employee.

As far as my successor goes, I strongly recommend that we execute our succession plan and name Tim Cook as CEO of Apple.

I believe Apple’s brightest and most innovative days are ahead of it. And I look forward to watching and contributing to its success in a new role.

I have made some of the best friends of my life at Apple, and I thank you all for the many years of being able to work alongside you.

Steve

Not only did Jobs create new products, but he also made it possible for others to thrive. Through creating tools easy for all to use, and ingenious solutions Apple, NeXT and Pixar have helped creating shoulders for other gigants to stand on. Every day cultural products, home movies and garage band projects, among other things, are created on products of his design. Tim Berners-Lee, the inventor of the web, first used a NeXT computer to serve the initial versions of the Web at CERN. Radiohead and many other bands, known or not, have used Logic to create music, and Francis Ford Coppola among other aspiring and successful movie-makers are using the mac to achieve their goals.

Steve Jobs was an inspirator for many, including me, he achieved many great successes and he changed the world. Computing today, would never been the same without Steve Jobs. I hope his inspiration, philosophy and spirit will live on.

 

An inspiring video from Jobs:

[youtube]http://www.youtube.com/watch?v=UF8uR6Z6KLc[/youtube]

2011 – What will happen?

2011 – What will happen?

Soon 2010 will be history, and a new year will begin. 2010 was a long year in which many interesting things happened (as every year). I will now look into my light ball, able to foresee the future, and come with some anticipations about what the new year will bring. As always is it impossible to judge the future, and how things are to become, so this is just some thoughts of what will happen, as a little new years tradition and for the enjoyment it is to read this predictions at this time next year.

2011 will be an interesting year, as every year, but it will not change the world dramatically. It will be a year in which politicians will have to defend their actions during the economic crises, and more countries will have economic problems. This will cause problems in Europe, and the Americas, but Asian countries, mainly China, will to a greater extent succeed due to the entangled economy connecting government to production. This will cause some critic due to the human right conditions in China, and arguments from the west will involve the freedom of the individual, while the arguments from China and a growing share of countries in Asia, America and Africa will focus on the ability to fulfil more primordial needs of Maslow’s  pyramid. This will not result in a crisis, but a general belief that the power centres of the world is moved from the US to other parts of the world.

This will also be continued by embarrassing leaks from the cables which we saw in 2010.  None of this will be fatal in world politics, but diplomatic personnel from the 90’s superpower will lose credibility and more questions will arise about the power in Washington. Especially the BRIC (Brazil, Russia, India and China) countries will try to establish themselves as more prominent players on the international arena, and this will be on the cost of the United States and the most loyal counties in Western Europe. There will be asked more questions about the politics within the European Union, and as more countries get into economic trouble, the focus will shift towards east, and this will improve the means of communication to Russia, but many will be sceptical and question the legitimacy of the rulers in Moscow.

In technology the trend of applications and devices will continue, and Apple will lead this process, at least in the mass medium, however will the early adapters look to other platforms which will emerge. The focus on mobile technology will be around, but will be replaced by a discussion on the nature of Television, which will be brought up as Video on Demand, Google TV and other technologies converging TV with the Internet will be introduced. This will cause another intellectual property debate, as many visual content providers will try to lock their customers into a network decoder relationship and focussing on propitiatory solutions instead of the open sharing. Downloading will still be important, but as more services are provided from the cloud instead through a physical media the control among the broad numbers of consumers will pay for services through subscription services which will be more popular to bundle with electronics sold in stores.

Among the regular consumers will this be the year their old phones are replaced by smart phones, and the vast numbers of users will be attracted this year. More affordable prices will be one of the most important reasons for this, as well as more useful services will be provided through mobile applications. Employers will also develop their internal systems onto portable applications, and this will trigger a debate on security. Security and privacy issues continue to be important and  a major discussion between these two will find place.

Online more people will realise that Facebook poses a threat to their privacy, and a more mature audience will be more aware of what they put online. The popularity the service experienced when it first opened and got popular will dismay, and users between 20 and 35 years will spend less time, but new generation will still think it is fun and spend more. Other social websites will be launched, but not with such popularity. Twitter will be more popular among a more professional audience, and the private users will not embrace the short messages and stick to more extensive sites; Facebook. Integration will be triggered, and 2011 is also a year when APIs are shared, and JSON intercommunication is popular between services. Some topical sites for users will be launched by iconic brands to keep customers loyal and together, this will be a big pat of the political landscape where politicians will try to get more legitimacy through dialogues with their voters, and they will need this as the economic crises expands, and their earlier decisions are being questioned.

This is just some core ideas and questions I think will dominate the next year. I have  not made guesses regarding natural crises, terrorism, integration and snow weather, but they will as well be prevalent topics in the year to come Oh, and I’ll give you an easy to check guess: I guess the Eurovision will be won be an Eastern European Country.

The picture  is the intellectual property of Scott Rivera, it is licensed under creative commons, and found through Flickr

iPhone goes large: iPad

iPhone goes large: iPad

During the last three weeks since the iPad was released, the Technology Press has been flooded by articles about the iPad, Apples newest gadget. The media has been asking questions like, What is iPad going to change? Will it replace the need for a printing press? Which former technology does it compete against? Which applications will be developed? and What will we be able to do with the iPad? It is clear that there are a lot of speculations about the iPad and what it will achieve. So now I will try to explain some of my ideas about the iPad.

The physical pad

My first impression when Steve Jobs showed off the iPad to the public was that this gadget seemed an awful lot like a big iPhone. The screen covering most of the device and the characteristic home-button, together with the soft-edge profile similar to the newer iPhones, made it clear that the iPhone design trend was still standing strong within Apple. This could be a result of the enormous popularity of the iPhone and the saying, ‘Don’t fix it if it ain’t broke’. At least that’s what I believe. Apple have found their design that expresses their ideology of making technology that is easy to use and which gets the job done.

The pad comes in several varieties linked to hard drive space and wireless network support. The differences in hard drive space is quite simple, more space for more money, but when it comes to the wireless network support it is more to look into. There will be a version which just supports the standard of 801.x, meaning that it will support wireless networking in the same standard as home routers work. The other version will in addition to the wifi-support come with a buildt-in 3G support which makes it possible to be online also through the cellular-phone network.  The iPad is an enlarged iPhone, but without the oportunity to make regular phone calls, but with different specifications follows different usage.

What can you do with the iPad?

“Its true, when something exedes your ability to understand how it works. Its sort of becomes magical. And thats ecactly how the ipad is” – John Ive, Vice President Industrial Design Apple corp.

I do, as Ive, see potensial in the iPad, but with that said: I do not see it as a magical invention. I persive it as an iPhone gone large. I do not think that it will challenge the book or renew the printing press in a major direction as many has suggested. Though it is true that the pad provide a posibility to show electronic articles, but there is nothing new about that. I read articles on my desktop and laptop everyday. So when Philip Schiller, Senior Vice President of Worldwide Product Marketing, in the presentational video says that: “its going to change the way we do the things we do- every day”, I think that could be an overstatement. With that said: I’m looking forward to see how the new touch screen is working, because it is in this the biggest difference between the Phone and the Pad lies. Apple promotes a web-browser, games, news and user made applications on their iPad website. The games can be used through a touch user interface or with the motion sensor. The most discussed usage is the news applications. New York Times have already published an App where the user can read the newspaper, and together with Apples own bookstore this could mean that there will be a focus on text application on the iPad. The bigger screen gived the Pad an advantage in comparison with the cell phones or PDAs with simmilar functionality, but with a use time on aproximatly 10 hours between each time it has to be charged it loose this competition against more direct electronic book marked products as Amazon’s Kindle.

I think that iPad is going to gratify an already existing market for gadgets which are changing they usability with their installed application. It’s not going to be a PC, but some of the tasks we normaly do on a PC can now be done on an iPad. The screen wich is bigger than on an iPhone or simmilar phones will make it more comfortable to use this with social media services such as Twitter, Facebook and Youtube.

With the popularity of Apples other products they have a big advantage when it comes to user reputiton. I guess there will be sold many iPads, but I doubt it will replace any existing technology rather I think it will mix in between the mini-devices as PDAs and cell phones and portable computers.

Video source: http://www.apple.com/ipad/ipad-video/

Bilde: Glenn Fleishman