The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 23, 2019, 02:39:32 AM

Login with username, password and session length


Pages: [1] 2 3
  Print  
Author Topic: I am completely converted.  (Read 15788 times)
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« on: May 11, 2011, 10:24:49 PM »

Several months ago I decided I wanted to write an iPhone app. I did my normal thing, researched a bit, went to Amazon, bought a few books and set about it.

Fail.

I just couldn't bring myself to lug around the books, no matter how much I wanted to do it. Nor, however, was I seeing the abundance of development books for the iPad/Kindle that I needed. Alas, I was stuck never being able to learn a new language again.

Fast forward to mid-April. I am pissed off that my Altec Octiv speakers go to sleep after about 30 minutes of no sound from my iPad ergo, the morning alarm does not go off (well, it goes off but the speakers are off so WTF.) Decided to get back after writing an iOS app. But that meant Objective C, the syntax of which looked rather unattractive.

But try I did, and Amazon now has lots and lots of super titles for developers all Kindleisized. So I grabbed "Beginning iOS Development" and "Programming in Objective C 2.0" (You could be reading these titles in Minutes!!!). As with my other reading, I am now completely a digital book kindaguy.

First as an aside, both books are pretty durn good and I was up and into my first Objective C stuff within about 15 minutes of racing through the book. I was then able to start skipping ahead to syntactical things I needed to see and set about modifying my first program to look like MY program rather than the books examples. Quick, painless and I highly recommend it.

But here's the part that really got me. One of the first things I wanted to do was move interface and implementation stuff out of the main.h file (duh) so that things would look like a real project. I aped the first line I saw #import <Foundation/Foundation.h> with my own, trying every conceivable directory structure I could think of but it failed every time, my classes could not be found. So I searched for #import in the book and came up with dozens of examples straight away of what I wanted to do and was rewarded with the fact that MY inclusions need to be quoted, not bracketed eg., #import "myClass.h"; kerPOW, all set. That did it. I started moving through the book in a hypertext way rather than standard reading serial and it changed things pretty quickly.

So now I'm beginning to embark on a path to author an itsy utility that will play a sound that is either too high or too low of a frequency for the Altec to reproduce, but will hopefully trigger the don't-sleep event and keep the damn thing alive. There are some gotchas here, like how I play my sounds on top of other stuff and such, but I'll get through that I'm sure. I'm pretty satisfied with XCode and feel as though I have a fast-track for learning the new language (which, as it happens, is essentially just more of the same with different syntax) and perhaps a new capability.

Yeah man! Haven't done a new language in about 3 years ... it's about time. Anyone else an Objective C'r?
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #1 on: May 12, 2011, 09:03:50 AM »

Good Fucking God man.
Finish the cart first. LOL

I am tempted to embark with you. But frankly, i dont know where i could fit it.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #2 on: May 12, 2011, 03:20:50 PM »

PHP, JS and MySQL stored procedures by day,
Objective C in bed. The only way to do it Smiley

Sometimes it actually helps me be more efficient, because I'll reward myself with a couple hours at night if I am (x) productive during the day. Amps me up to have that carrot. I also find that if I am in that mindset I am a better coder no matter what language.

Funny - PinkHat rolls over last night, looks at the ebook, notices there are no naughty pictures  and says, "what the heck are you reading?!?!" I guess she doesn't find encapsulation and polymorphism as sexy as I do ...  ROFLMAO
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #3 on: May 12, 2011, 03:23:46 PM »

And oh, BTW: when you're ready I'll be able to bring you up to speed really quickly. You've got reasonable C/C++ chops, yes?
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #4 on: May 12, 2011, 07:01:14 PM »

Not anymore. My biggest issue is that I am back to being a classless procedural programmer. I think the last time I wrote a class was 6 years ago. Lol
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #5 on: May 12, 2011, 08:18:42 PM »

I have to admit that I really need to stay focused to be be a good OO programmer with all my current production languages ... But Objective really pushes you to do it right. It's a bicycle meng, you'll snap right in.

Perhaps we come up with a joint 'pad app to work on together. I am going to blueprint/storyboard my network toolkit here shortly and use it as my first f'reals project - I think your input would be hot.

<Edit: phuquing AutoCorrect patch/>[/blue]
« Last Edit: May 13, 2011, 08:21:54 AM by perkiset » Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #6 on: May 13, 2011, 07:13:44 AM »

Can you make an app that does my work for me? Oh wait that's India.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #7 on: May 13, 2011, 08:20:39 AM »

We've upgraded to iIndia 2.0 man. Didn't you get the memo?

Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
kurdt
Lifer
*****
Offline Offline

Posts: 1153


paha arkkitehti


View Profile
« Reply #8 on: May 13, 2011, 08:51:26 AM »

I'm still loving javascript and right now at least I can't imagine why I would want to learn objective-c. JS has awesome paradigms like callbacks, the whole async model, closures and non-blocking IO (nodejs feature). I can whip up custom webserver up in few minutes with Connect and using Riak is just a breeze. And I have abandoned TextMate almost completely and I'm using Cloud9 right now. It's funny that when I was working with PHP, it was always like writing scripts that I would then run via Apache or Nginx. Now it's just all-in-one because it's just a question of running Node server that uses REST or accepts JSON via post.

By the way, objective-c and other lower level languages are soon so over for application development - mark my words Smiley
Logged

I met god and he had nothing to say to me.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #9 on: May 13, 2011, 09:05:51 AM »

JS is not a true OO language and it pisses me off. I am fluent and quite functional, but it's a kludge language. Of course you understand that JS is scripted and interpreted not compiled. So when you want blazes you'll never get it from JS. I totally get it's strength, since virtually all of my user-facing stuff is a single page web app using JS Ajax and PHP on the back side. But it's because what is required, not because it's what is desired.

I'm LOL at the "Lower level languages are soon over for app development" I've heard that for probably 20 years now. Never happen. Well, perhaps for your regular Joe programmers, but for folks that will be writing the languages that regular Joe programmers use, you'll still need something closer to the processor. But regular Joe has been using Visual Basic since what, '93? Was that the first push that lower level languages will soon be gone? Wait, no I remember people saying the same with Clipper between 85 and 87. When I was writing C extensions to the language because it was not fast enough  ROFLMAO

<serious>I think that the beauty of it all is that there is everything from assembly to JS/PHP because the right tool for the job exists. That's why lower level languages will never go away, because for many things, they are the right tool for the job.</serious>
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
kurdt
Lifer
*****
Offline Offline

Posts: 1153


paha arkkitehti


View Profile
« Reply #10 on: May 13, 2011, 11:11:35 AM »

JS is not a true OO language and it pisses me off. I am fluent and quite functional, but it's a kludge language. Of course you understand that JS is scripted and interpreted not compiled. So when you want blazes you'll never get it from JS. I totally get it's strength, since virtually all of my user-facing stuff is a single page web app using JS Ajax and PHP on the back side. But it's because what is required, not because it's what is desired.
And OO is the only true way because...?

Javascript runs as fast as it's VM. I remember vaguely somebody saying something about how java is never going to be fast enough...

Quote
I'm LOL at the "Lower level languages are soon over for app development" I've heard that for probably 20 years now. Never happen. Well, perhaps for your regular Joe programmers, but for folks that will be writing the languages that regular Joe programmers use, you'll still need something closer to the processor. But regular Joe has been using Visual Basic since what, '93? Was that the first push that lower level languages will soon be gone? Wait, no I remember people saying the same with Clipper between 85 and 87. When I was writing C extensions to the language because it was not fast enough  ROFLMAO
Baggage of the past in action here. You did notice I said "app development", right? That's not something where you need to be "closer to the processor". You do know that all the major browser layout engines (webkit, firefox's and ie) offer access to GPU in order to get some hardware acceleration for animations & graphics (canvas for 2D and webgl for 3D)? Just out of curiosity, tell me one thing I can't do with javascript that wouldn't be fast enough? And just as reminder, we are still talking about apps and not hardware drivers or other programs that need direct access to some device, that's something you really want to use C & co. for.

Quote
<serious>I think that the beauty of it all is that there is everything from assembly to JS/PHP because the right tool for the job exists. That's why lower level languages will never go away, because for many things, they are the right tool for the job.</serious>
You are right but only few of those options are really necessary. In programming languages too many choices lead to fragmentation where some programs can be compiled in some platforms and not others or they might require some extra installations. In fact, only programming language that's supported in almost every modern networked computing device is javascript. But due javascript's past and crappy engines, performance varies but at least the code runs.
Logged

I met god and he had nothing to say to me.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #11 on: May 13, 2011, 11:33:04 AM »

And OO is the only true way because...?

Javascript runs as fast as it's VM. I remember vaguely somebody saying something about how java is never going to be fast enough...
OO is not the only way, but it is certainly one of the best. JS is always flaunted as an OO language when it is simply object based (and funky at that). I am not saying that JS is not fast enough for many things. In fact, it's pretty damn good for a lot of them, public facing UI when a browser is the view portal is wonderful. But it's hardly the be all. Scripted languages just aren't. And BTW Java still gets handed it's lunch in many tests against optimized C et al - but that's really the point isn't it? If top speed is not a requirement then Java may well fit the bill. (Yes, there are many optimized Java items out there and it's doing quite well ... but it has pulled away from it's scripted roots and is almost a compiled language now. That's how I use it in fact)

Baggage of the past in action here. You did notice I said "app development", right? That's not something where you need to be "closer to the processor". You do know that all the major browser layout engines (webkit, firefox's and ie) offer access to GPU in order to get some hardware acceleration for animations & graphics (canvas for 2D and webgl for 3D)? Just out of curiosity, tell me one thing I can't do with javascript that wouldn't be fast enough? And just as reminder, we are still talking about apps and not hardware drivers or other programs that need direct access to some device, that's something you really want to use C & co. for.
ROFLMAO Oh man ... OK, simple example. I've written a custom XML parser (because many of the available options did not suit me) for C, C++, Object Pascal, PHP and JS. Guess which ones beat the HOLY SHIT out of the others? Here's the deal: fundamental elements will always be better written in low level languages and many application styles may be written in high-level languages like JS or PHP, but they will not be better. Just easier to author and (maybe) read. That's why Visual Basic did so well for so long: it was *enormously* easy to get high functioning apps written that were reasonable. But try writing a time-sensitive game in VB. No way.

You are right but only few of those options are really necessary. In programming languages too many choices lead to fragmentation where some programs can be compiled in some platforms and not others or they might require some extra installations. In fact, only programming language that's supported in almost every modern networked computing device is javascript. But due javascript's past and crappy engines, performance varies but at least the code runs.
"Few options that are really necessary" well, I can switch it and say the same. You mention a requirement in this paragraph by bring up platform portability. Well, if that degree of platform portability is required regardless of performance then you are 100% correct. If performance is at all an issue then you need to start bending other requirements. And if you then bend away from the any platform requirement and start conceding things, you have other options.

If you want to write apps for iOS you really have two choices: web based, HTML5+JS+(a backend language) or Objective C. Note that if your requirements for application execution have the tiny bullet point "runs offline as well" then you really can't write a web app, huh? This applies to all the Android platforms as well.

Don't get me wrong Kurdt. Virtually all of my public-facing apps are HTML/CSS/JS/AJAX/PHP/MySQL+Stored Procedures. Note that all of these languages (whether executable or descriptive) offer a very specific capability and thus are used for maximum effect. And it's GREAT because users fire up either IE or FireFox or Safari or Chrome or Opera or or or and they get to run my apps. Delightful. But that toolset is for a very specific type of app with a very specific set of requirements and parameters. Some of which are, "you must always be connected to the net to use this" and multiuser capability and WORA.

Within my first couple projects with Objective C I intend to write my own network toolkit, because I have a specific way that I like to triage problems. There's no way I can get the data I need from JS, period. (Well, I could probably hack my way into most of it, but that's just the wrong way to do it) So here we have a simple app that has a tiny requirement that JS just can't do. Poof, instaNeed for lower level language.
« Last Edit: May 13, 2011, 11:36:35 AM by perkiset » Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nop_90
Global Moderator
Lifer
*****
Offline Offline

Posts: 2203


View Profile
« Reply #12 on: May 13, 2011, 01:56:14 PM »

JS is not a true OO language.
It is a OO language, just its OO is not the same as what you think OO should be Wink

You just on a buzz because you found a new language Smiley
After working with it for a month, all the warts start to show etc Smiley

Basically you need 3 types of languages
1) Something that compiles to machine code
2) Some sort of glue language python,JS,ruby,lua,etc
3) Some sort of DB language, SQL etc.

If Borland (or what ever they call themselves) would get their shit together.
And release something new in the last 10 years ....
http://www.freepascal.org/ compiles to a zillion different platforms, and does 32/64 bit for windoze.
But the problem for windoze or other platforms is the API headers.
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #13 on: May 13, 2011, 02:08:39 PM »

It is a OO language, just its OO is not the same as what you think OO should be Wink

You just on a buzz because you found a new language Smiley
After working with it for a month, all the warts start to show etc Smiley
ROFLMAO Well perhaps you are right. Having started with Stroustrups book in '90 and being deeply OO since about '91 I do have some baked in opinions. But since JS doesn't handle the all the simple basics of encapsulation, polymorphism and inheritance (at a minimum) it really doesn't qualify as a true OO language.

@New language - I completely agree. Having forgotten more languages than most people will ever learn, I know that to be true. But that said, C is C is C pretty much ... the downsides are all pretty well established. Objective shapes the code differently, probably because people didn't like the syntax of others - but I really don't see it as much different at all. I think they are trying to get people to think differently, but whether that's successful I dunno.

Basically you need 3 types of languages
1) Something that compiles to machine code
2) Some sort of glue language python,JS,ruby,lua,etc
3) Some sort of DB language, SQL etc.

If Borland (or what ever they call themselves) would get their shit together.
And release something new in the last 10 years ....
http://www.freepascal.org/ compiles to a zillion different platforms, and does 32/64 bit for windoze.
But the problem for windoze or other platforms is the API headers.
@ Toolset: pretty good list and I agree. Although today it's probably wise to add a deep understanding of a descriptive as well, like HTML5 and/or CSS.

@Borland: I LOVED Borland's stuff and miss it quite a bit. My first real C++ was Borland with OWL. In about '93 we wrote a whole bunch stuff with it and it was great. My last Borland was Kylix (Delphi/Object Pascal for Linux) and I still have about 200K lines of that code running on one of my oldest retail transaction sites.

But at the core your point echos mine - it's about the right tool for the job, as opposed to language religion. IME when someone falls in love with a language then EVERY job is best done with it and it is "perfect."
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nop_90
Global Moderator
Lifer
*****
Offline Offline

Posts: 2203


View Profile
« Reply #14 on: May 13, 2011, 02:57:16 PM »

pretty good list and I agree. Although today it's probably wise to add a deep understanding of a descriptive as well, like HTML5 and/or CSS.
HTML is nothing besides XML which is nothing besides Lisp lists with some stupid <> cruft around it.
First time they where spouting XML, some guy had some huge book on it. 1000+ pages "XML Bible" or some shit.
DOM for xhtml is nothing more then a tree. Since you can make trees with lisp lists (they have been doing that since 1955), dump them, load them etc.
Nothing new under the sun. Also since you can embed "code" inside a lisp/scheme tree it is even better then XML Smiley

Simple shit wastes my time.
strings, for "C" there is null terminated strings 8 bit. Then throw UTF strings into the mess. The M$ makes their own string versions. But literally they have 5 different types of strings.
Delphi has their own versions of strings. C++ has their own string class.
So you end up with 10+ versions of strings which you have to try and convert back and forth.
So someone makes a "framework", so now you end up with another version of strings.
Then you have frameworks that manage frameworks Smiley Java is the fuking worst for this Smiley

Then with closed source software. The API docs do not always match the "source".
Objective C is great if you are just making stuff for Apple. But when you end up with other platforms .....

libcurl was a good library. It did what it was supposed to. No cruft, a simple "C" library so you could use C or use another language.
But libraries like that are few and far inbetween.

Delphi/FPC pascal works great till you try and interface with the outside world.
If you just use C, you may as well use assembler FFS Smiley
Anyway that is my bitch Smiley
Logged
Pages: [1] 2 3
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!