Updates

Dev Bootcamp and App Academy

So I’ve been a bit remiss about my wee blog this past week. Reason being that I’ve been throwing myself into studying Ruby in order to take a coding challenge for App Academy.

What is App Academy or Dev Bootcamp you ask?

Well in short, they are both nine week intensive courses designed to train you to effectively code Ruby on Rails. The intent is that you graduate with enough skills to be “a world class beginner” and a successful member of a development team. In short, they both are freaking awesome. The only real difference between them that I can tell is their pricing structure. Dev Bootcamp requires payment upfront, App Academy only requires payment once you get a job. Either way, both are truly exceptional programs.

I’ve been in the process of applying to both of them this week. Dev Bootcamp requires a video submission where you tell a bit about yourself and you also teach them how to do something. I’m teetering between changing a diaper or making a fire (I lean towards making a fire for somewhat obvious reasons…). I plan on completing this during the weekend.

App Academy requires you to take a coding challenge in Ruby. They provide prep materials via Ruby Monk (www.rubmonk.com) and Code Academy (www.codeacademy.org). I went the Code Academy route and I thought the instruction rocked. They also provide practice problems.

I did really well on the practice problems and when I compared them with their suggested answers I walked away really confident. My answers were well more developed than what they were looking for. Supposedly this was to prepare me for the actual challenge.

It sorta did…

The challenge was harder than I expected probably due to the time limit and the “HOLY CRAP I CANT FAIL! I NEED TO SUCCEED IN THIS FOR MY FAMILY’S SAKE!” So I get nervous once in a while. But over all I think I did well.

After that there was a second challenge. This one sucked. Hard.

Honestly, the prep material didnt cover this level of work. However, I pieced together as much as I could and submitted answers to 2 / 4 problems. I’m crossing my fingers and hoping that this was a test to see what I could do when faced with a “OMG, WTF do I do now?” scenario.

All in all, I’m rather confident. I know that I can do this very well if given the training and the time. I also know that I LOVE learning this stuff. I truly find it fascinating and wonderful (in the literal sense of the word). I WANT to have a career as a programmer, I NEED to have a career as a programmer. The next step in the App Academy application process is a Skype interview. I just hope I can convince them that I fit the profile of the guys they are looking for.

We’ll see where this all leads. Its in the Lords hands now.

Advertisements
Standard
Updates

Victory! Sort of…

So I’m once again out of town. This time though I’m pulling a two week stint and I’m enjoying my paid day of rest. I’ve spent the whole day working on my Caesar Cypher and my Vigenere (Vig) Cypher. I’ve prettied up my Caesar Cypher by removing the heavy lifting to two functions. Also, the actual function I used to encrypt the message I can actually use in both cyphers. Stack Overflow has become an excellent resource. It seems like there are people out there with nothing better to do than answer other peoples questions.

I’ve uploaded the updated versions of my Caesar Cypher as well as my Vig Cypher. Heres the link:
https://www.dropbox.com/sh/03al9iunbl4z6an/wf04LqhASw

Here lies the rub: my Vig Cypher to compile. I tried to just post it here direction as a code block BUT for some reason WordPress decided to completely ignore entire chunks of my code, completely erasing them. Soooo, if you want to help me find my problem you’ll have to download it from my Dropbox. Cest la vie…

Anyway, I keep getting an error at line 32 where I have:

CypherShift (plainText[i], argv [1][j]);

The error I get is: passing argument 2 of ‘CypherShift’ make pointer from integer without a cast

I also get this error on like 9 where I prototype the function: note: expected ‘const char*’ but argument is of type ‘char’

So yeah, I dont want to vomit my entire wee program onto Stack Overflow and thus beg for help. I think its a bit out of good form to do that. So if the world reading this has any input, I’d appreciate it.

Standard
Updates

Vigenere Cypher

So I’m trying to convert my Caesar Cypher into a Vigenere Cypher. The difference being that Vig uses a shift word instead of a single shift number. For example:

Caesar Cypher:

– if the shift number is 2, and the secret message is “A B C” then the encrypted message would be, “C D E”. 

Vig Cypher:

– each letter in the shift word has a corresponding number. A = 0, B = 1, C = 2, etc. SO lets say our shift word is “cat”. That would mean our shift sequence is: 2 – 0 – 20. So if our message was “New York”, the encrypted message would be, “Peq Aolm” (pending I counted through my alphabet correctly). The shift sequence of “cat” is repeated until the message is fully encrypted. 

So I cant figure out how to implement a shift word, with its corresponding shift number, and then iterate over a secret message using the proper sequence of numbers. I’m at a loss to figure out how to iterate over an array with another array.

Suggestions?

Standard
Updates

Hail Caesar!

So I figured out how to make a Caesar Cypher work! It hit me this morning.

First, I dont need a second array. Or an array at all for that matter (unless you count argv). Once I wrapped my mind around how you can add an int to a char and change the actual char it was simply a matter of iterating over each char, moving it by its shift, and then printing it one by one. I had to throw in a set of conditionals to discern between upper and lower case letters but other than that its pretty simple. As per the instruction of the problem set I had to leave the non letter chars alone. 

I’ve uploaded it to my dropbox. Take a look here: 

https://www.dropbox.com/sh/kurep4cs3jj9hlq/jsVV9ZT2yG/pset2

I’d gladly take any ideas on how to better manage those conditions. They look a little ugly to me. I feel like an an artist who has yet to learn how to draw more than stick figures. Meh, it’ll come with time. 

Now I need to figure out how to implement a shift word instead of a mere number. Yeessss.

Standard
Updates

Long work weeks.

Last week I worked out of town all week. This week I’ll be pulling a two week straight stint. Then I have drill. Then another week. Ugh, it goes and goes.

On an upnote, I’ve been pretty good about getting up and studying. Lately though I havent produced much because I’ve been watching a lot of lectures. So now I’m tacking problem set 2.

The first program was a simple one that required me to print on the screen all the lyrics to “This Old Man.” 

This old man, he played one
He played knick-knack on his thumb

and so on. Its nothing special but its meant to be a first go around in using arrays. The awesome part about this program is that it complied and worked on my first attempt. Woo! I just had to add a few \n to make it format properly.

The other problems have me creating a Cesar Cypher. I have yet to really get this one down on account that I’m a little foggy on a few points.

– how to convert a char to a corrosponding ASCII int. From what I understand, you can typecast it and it’ll do the legwork. 

– from there I want/need to know how to initialize an array thats empty waiting to be filled. Can I even do that in C or do I have to know its size ahead of time? 

The next problem set calls for a Vigenere Cypher. For the uninitiated, its similar to a Cesar Cypher but instead of a single number shift it uses a shift word. Each word has a corresponding number and the words are shifted according to that number. Since I havent worked through the Cesar Cypher I havent applied much thought to this problem yet. 

So thats that for now 🙂

Standard
Updates

Accidentally Over Ambitious (Part 2)

https://www.dropbox.com/sh/kurep4cs3jj9hlq/xS376y-YLq

The above link goes to my CS 50 Dropbox folder that has the three wee programs I had to write.

Pennies.c asks the user for how many days in the month and how many pennies they initially have. It outputs how much those pennies add up to when treated exponentially. I need to learn how to include commas in large numbers. The course doesnt say it explicitly, but I believe the point behind this program was to experience how inaccurate computers really are. Its all bits and bytes and this is something to sit and go over with Dr. Dave. It’s somewhat foggy to me. I was also surprising to learn that C does not have an operator for exponentiation. I later learned that if you use the math.h library you have the pow function.

Greedy.c asks the user for how much change is due. It then computes the fastest way to reach that number with the least amount of coins. Starting with quarters and moving to pennies. Its pretty easy conceptually especially if you use a modulus operator but for some reason I cant get it to compile. Help.

Lastly, chart.c asks for how many specific types of sightings occurred between the sexes. It then needs to take that input, calculate it to a percentage of 80 asterisks (*) printed on the screen to act as a graph. Its pretty silly. The formula I came up with/came across doesn’t really seem to work. It prints all the * on the same line.

Overall, it rocked. It was a much more reasonable problem set for an introductory class than MIT provided. Also, I’ve taken to C much easier than I thought. Although its freakishly annoying when I forget something like a simple “;”. The copious documentation (and the fact that C apparently hasnt changed at all for about 15 or so years) helps. I’m curious to learn the actual differences between C and C++, C#, and Objective-C. Are they like brothers from the same mother, or cousins far removed from a distant sire and constantly seeking to usurp the throne of the other… oh wait, I’m mixing my studies with my enthusiasm for the new season of Game Of Thrones.

Speaking of which, I’m tired. Off to relax world.

Standard
Updates

Accidentally over ambitious (Part 1)

I find myself with a few min to post an update so why not.

So I’ve spent past few days heavily working on Problem Set 1. I’ve gotten acquainted with C as well as using Terminal or a command prompt to do things. The problem set had three programs assigned. I’ve successfully completed all three but two of them have some bugs (one that breaks it, the other just doesn’t output right). BUT it does compile!

I’ll post them later this evening for inspection. I’m debating on just including the code here or linking to somewhere I can store files and have them freely accessed. Any suggestions on such a place?

The big thing I realized is that I was being a bit overly ambitious. I thought that (acfording to the course schedule) this problem set was due after week one. It’s actually due at the end of week two. Week two also covers a lot of topics that help in the problem set. No wonder I had some headaches…

More to follow

Standard