Showing posts with label Objective-C. Show all posts
Showing posts with label Objective-C. Show all posts

Friday, August 29, 2014

Learning Java...



I now know what they meant when they were saying that Ruby and Python are languages that are designed for the programmer vs. the computer, and how they make programming fun. Initially, I thought "how can programming not be fun?" However, after studying Objective-C and Java, I'm pretty clear on what they were talking about.

Java, from my understanding, so far, is a "lean" language, so you have to import "modules" that are already packed into Python and Ruby. In Java, you  have to write "import java.util.Scanner" to allow the user to input information, whereas you can just create a variable to accept the input in Ruby and Python. There are other little things like declaring types for variables and only being able to use one type of object in arrays, that make programming in Java...different.

The cool thing about declaring a type of variable, though, is that you decide what kind of variable you want to use ahead of time and you don't actually have to write your number in a decimal form, if they don't have numbers following the decimal. This is good for programming because you are thinking through the type of result that you want, which avoids using integers, when you want a float and having to go back and put in the decimals if you forget.

Another built in feature in Ruby and Python is the error messages. Although, you can resolve that situation by using an IDE, it comes built in to the other languages and coding in Java requires you to *sigh* download a IDE like NetBeans, free of charge and install it on your computer, when you're first getting set up.




Things that you can do using Java that you can't use Ruby and Python for? Compiling programs into .exe and other files that you can run as stand alone software (I think you may be able to do this on python, with some extra effort...Cython?) and building native mobile apps for android, which is huge. I think that with the popularity of mobile devices, not being able to use a language to build native applications for them is a pretty big disadvantage...if you like making stuff for other people to use. Even though there are plenty of things you can still build for people who are sitting in front of computers or for things that use Raspberry Pis or Arduinos. For me, the most exciting thing right now, as far as development is concerned, is making things that can be used no matter where they are on many different kinds of devices. I really hope that something can be done about this...and soon [ yes, I know about Ruby Motion :) ].

Challenges with learning2Java that aren't about the language itself:
  1. The writers of the books. I'm not literary expert or anything, but the way that they write/speak is hard to follow. The way they say things is not fun, at all. I don't know if it's just me or what, but I had such a hard time reading the books that I decided to watch youtube videos first so that I could get a general understanding of what's going on. It's not like I don't like to read or I just picked books at random, either. I did an internet search to try to find the best books to learn with, but yeah...
  2. Leaving this hanging: public static void main(String []args). Yeah, you really can't do that. It's not cool to tell me that you're going to explain something later, and then wait to talk about it at the end of the book. Sorry. I NEED to know. [ note to self: why haven't you googled this, yet? ]  How about walking me through it and then going into more detail later. I understand that "public" means that it will be available to other code, they explained that "main" means that this is the operating class that the compiler will look for, and from studying Objective-C, I think that "void" means that a function will not return anything, but I have no idea what that means for a class or if this is even the same thing in Java, and "static"? I need all of this explained and I need to be clear that I'm thinking in the right direction on this. That "String []args" part also needs to be explained, especially since I keep seeing those square brackets moved to different places in different code. How am I supposed to concentrate on what you're trying to teach me if this keeps coming up unexplained?
This probably sounds like a lot of complaining, but it's just my growing pains. I'm definitely going to take advantage of all opportunities to learn new things. [ ...especially Java, since it's the dominant mobile platform and I definitely want to develop for it...even though I have an iPhone ;) ]. I'm just getting started with Java and Objective-C, so if I start saying things, in the future, like "I don't see what people's problem with Java is" or "actually, Objective-C is pretty cool, I'm glad I learned it before I started Swift" don't be surprised. :)

I think that I'm going to go study a little Ruby now. 

...because Ruby.





Sunday, August 24, 2014

Coding and Stuff...



Last week, I started getting a little bored with programming in just ruby, so I decided to go back to learning a few other languages. I watched the Google Class on Python and I picked up the Code School Objective-C tutorial, again. I find that studying other languages gets me a away from the syntax of the languages and more into the larger concepts involved in programming. In the beginning, I just thought that you should just learn one language and get really good at it, and then maybe pick up some others a little bit later down the line. What I have found is that once you think you have a decent grasp on the basics of one language, it's productive to pick up another language, with the same paradigm [i.e. object oriented, symbolic, functional...]. This is works for me, because it forces you to really understand the concepts involved, it breaks up the monotony of studying the same thing over and over, and, pretty much, without fail, every author brings a unique perspective which leads to new insights on programming in general. Recently, I've had a chance to start reviewing the code of other programmers who are just starting out and it's made me realize how important it is to learn to actually program versus just being able to code in a language.

Speaking of which, I heard back from the company that I wrote the Mars Rover program for and I am happy to report that I have done my telephone interview and will be visiting the main office next month for the final stage in the process. I think that I am a very strong candidate for this company and I am super excited about the prospect of working there. On Friday, I went to the Atlanta office and meet one of the developers there. He was super cool and made me feel really good about the job and my chances of actually getting it, so...that was positive. Among the things that I love about this company are lots of travel, flat management structure, the fact that you have a voice in the things that you work on, and the people working there are "my type of people."   I can't wait to go up there. My entire experience with this company has been awesome. I can't think of a better place to be for my first, possibly only, programming job.


Which brings me to: I just started learning Java. I have to learn Java for Algorithms I, as well as for this new position, should I get it. The algorithms class starts next week, but if I get this job, they will also teach Java in training. This will give me a leg up for the job and also allow me to develop mobile apps for android, which is something that I'm definitely interested in.

Java is an object oriented programming language, so it's not a big departure from what I already know. The syntax and the things that it requires, such as the requirements for declaring variables, are a little bit uncomfortable after starting [restarting] my programming education using ruby and python. I'm pretty sure that I'm always going to prefer ruby and python to any other languages, but I'm learning to appreciate Java and at the end of the day it's more about the applications and building cool stuff.

Monday, June 16, 2014

Objective C and Other Distractions



So I've been working with Objective C since last week...and this is starting to get a little bit frustrating. Python was supposed to be my thing on the side and now I've picked up something else...and loving it.  I have found, and still find, Objective C to be a little cumbersome, but I'm also starting to like it. I  also feel like it's helping my overall growth as a programmer, but it's making me question learning languages like python and ruby, because you don't want to deal with languages like Objective C, afterwards.

I'm also being tempted by other things...like Java and JavaScript...and getting better with HTML and CSS.
Going to all of these hackathons and talking to other coders is  piquing  my interest in other things and just really getting me excited about coding. Coming in, I didn't really know about the limitations of languages as far as what they could be used for. My biggest surprises/challenges were:






      • not being able to use any language to make mobile apps
      • having to have an MAC to make apps for iPhone and iPad
      • having to learn Objective C to make apps for iPhone and iPad
      • having to learn Java to make apps for Android
      • not being able to compile ruby and python into executable files


To be fair, I read/was told/heard that the best way to go about programming is to decide what you want to make, and then learn the things that allow you to do that. However, no one tells you the above. I think that a major problem with learning to program is that the people who really know how to code don't really think or rememeber what it was like in the beginning. When I started learning, I was fascinated by programming, in general, and I wanted to make things...all kinds of things. For me, it would have been much better if I could have just used python or ruby to do whatever. Something that I also heard, in the beginning that maybe threw me off a little was that you can use any language to approach a problem, which is true, but misleading [see above]. 

But to get back to my original point, I have being hearing a lot of great stuff about JavaScript, like Angular.js and Node.js, and I'm really interested in learning more about it. At the same time, I want to learn about Java to make Android apps, and C/C++ so that I can make executable programs and because I also heard that execution was much faster than programs written in Ruby and Python...and this is just the beginning. My world is just opening up to this stuff. 

The frustrating part is that there is still so much that I still want/need to do and learn in Ruby, and like I said, I've just kind of been treating Python like a side project. I keep catching my self contemplating trying other languages [like the other day when I almost started that Angular.js tutorial]. 

I want to make an app or two using Ruby, and at the same time, I want to do some engineering things using Raspberry Pi. Oh well, I guess I need to just get back to it...

Sunday, June 8, 2014

Having to type "NS" and "@" is Front of Everything is Not Ok.


This weekend I attended a hackathon at the AT&T Foundry in Atlanta. As always, I learned some new things, got different perspectives on coding, and met some cool people. That was the good stuff, the not-so-good stuff was the way that the event was structured. This was only my third hackathon, but I have gotten used to all of the ideas being pitched and then being able to join that team and work on the idea that I liked the most. This was not that. When we got there, it was basically: find a team and make something, which meant finding someone to work with, agreeing on a problem to be solved, and then agreeing on the solution. I think that putting so much of the burden on the participants made for a much less productive event than it could've been.  Most of the people at the event spent the entire first night trying to find a team and come up with an idea. Personally, my team didn't even have a viable idea until 4 hours before the judging and we ended up not even presenting. 

One of the things that really struck me about this event, was people coming to the event in teams and being really secretive about what they were working on. This wasn't a widespread issue or anytihng, just something that stuck out. In an environment where everything is going to be open-sourced in the end, I think that this attitude in non-productive. I think that people do this for two reasons: a.) they want to split the prize "money" with as few people as possible, and b.) they overestimate their idea and underestimate what new perspectives and talents bring to the project. When people come to hackathons with this mentality, their time is wasted if they don't win a prize, and if they do win a prize they exposed their idea to others on the cheap. They don't learn anything new that they couldn't have gotten form just going to a coffee shop or other work-space and building the project, they open their ideas up to appropriation, and most importantly, they don't meet new people. Sucks to be them.

Anyway, I think that my most positive take away from this weekend was my need to either learn Java or Objective-C so that I can work on mobile apps. While I love Ruby and Python, I also think that being able to convert my applications to mobile apps is going to be important in the future. To that end, I have started learning Objective-C and I'm completely missing the point. I haven't gotten too far into it, yet, but from what I've seen, I can't understand Apple's decision to devote resources to build their own languages for their applications. Ruby and Python seem like way better solutions at this point and I just really don't see the appeal of Objective-C.

 Although, I am enjoying taking some time to look at a new language. I can't really see myself spending a whole lot of time on it, right now, but I'll be really ready to get something out of my study when I decide to. I'm going to start building stuff in Ruby and Python in the immediate future, but soon..

Also, I did manage to get some cool T-shirts from Crittercism this weekend, though.