So I thought I would take a little break to offer some tips for preparing for pair programming interviews from the view of a newbie to pair-programming.
Focus on high-level rather than low-level concepts
Trying to crash course in all the Ruby/Rails features of a language is going to overwhelm your brain. Focus on really getting main concepts of Rails and how everything is connected. Read the Ruby and Rails docs. Code School‘s Rails courses are great too.
Work through existing apps, both your own and others.
Most likely you will be working off an existing coding database in your interview. Studying existing apps is super helpful for this. Be able to speak about the model relationships. Be able to speak about what is going on in the controllers vs the models. How does this all connect to the views? Find apps that have tests, walk through them. If there aren’t tests, write some! Do some refactoring. Maybe build a feature or two.
Practice with someone
I was really nervous about doing this because I didn’t want to inconvenience someone and I didn’t want to look stupid. Better to feel that way in practice than the interview! Ideally you should be set up in an IRL setup (side-by-side dual screen if it will be in person or a remote solution if your interview will be remote) but take what you can. Think out loud, ask questions, switch roles.
Get a good night’s rest…no really
You are going to need to be alert and able to speak clearly…and code at the same time…for several hours right along with someone so make sure to get a good night of sleep! Sleep over cramming.
We are here in Week 1 of learning Python! So far, it is going well. I feel I am picking up things pretty quickly. Just a recap, in the last post we learned a little intro and about strings and lists. Today we are going to talk about sorting, tuples (??), dicts, & del.
Sorting a list can easily be done with the sorted(list) function. FYI: This doesn’t actually change the original list. You can pass through arguments to say, reverse the list like this: print sorted(list, reverse=True). The Python Wiki will tell you more. You can also use custom sorting with key=. Basically you would first use a predefined function and pass it through: print sorted(list, key=MyFn).
I’m going to take these first lines directly from the Google Python Class (thank you license agreement!) because it sums these tuples up well: “A tuple is a fixed size grouping of elements, such as an (x, y) co-ordinate. Tuples are like lists, except they are immutable and do not change size.” You can create a tuple by just using parentheses. Because it is fixed size, remember to have the appropriate holding spaces separated by commas or you will get some errors. You can deal with tuples similarly to list except for things like append or things that assign indices or slices. I’d read up on them on say WikiBooks or the Python Docs.
Dict (Dictionary) is Python’s key/value hash table structure. Side note: I had a hard time with hash tables and arrays in Ruby. I kept confusing them. Probably my roughest hours were working with multiple APIs and thus hash tables in my first major class project and I seriously just wanted to throw out my computer. I’m at a better place now. BACK TO PYTHON DICT. I think this is easier to explain in code:
There was a section on % formatting basically that for an integer if you say had hash[‘count’] = 27 and a string hash[‘fruit’] you could write it in in a string as string = ‘There are %(count)d %(fruit)s in the bucket’. Self explanatory.
So that variable, list element, or dict entry is giving you some trouble and you just want to get rid of it. Del that thing!
So we got through week 1 of Python! Over the last week we learned about Strings, Lists, Sorting, and Dicts plus the little parts that go along with them. At this point I am going to take a break from the Google Python Class to do Team Treehouse’s new Python Basic course as it goes over using Python, strings, numbers, lists, and control structures and functions. Plus I get to build a little game! FUN!!
I’m a Rubyist, I love that language. It is so fun and makes me happy. Regardless, I keep seeing jobs at companies that excite me but require or majorly emphasize Python. It has been getting me down and I finally (with the help of awesome YKat) decided, why don’t I just teach myself another language! So we begin today.
Python definitely beats RoR on install…my mac already was all setup for Python. Boom. Did I tell you I just had to re-setup my whole system because I spilt coffee on my computer and fried it? *cries*. RIP MacBook Air. Anyways, back to Python.
I’m following Google’s Python Class for people with some programming experience. It is FREE online. They do it as a 2-day intensive on campus. It includes written lessons, exercises, and lecture videos. It is a bit outdated but the core concepts should all be good.
Day 1 – Intro, Strings, Arra…I mean lists,
Google’s Python Class comes from a “you probably came from a C++/Java background” stance and even though it has been 10 years since I coded in those languages, it helps to get those pointers. I will mainly just be focusing on Python vs Ruby though. *Reminder to create/find Ruby/Python Cheat-Sheet*. Formatting is imperative with Python ie. the end of the line marks the end of the statement, indentations are used to express meaning, no need for semi-colons, etc. Concise and clean. Reminds me of CoffeeScript, which I enjoy. Mmm Coffee.
Strings-known as str. The len(str) function gets the length of the string and if you are doing the Google Python Class, be prepared to use it over and over. There are a bunch of string methods found here which you should keep handy until memorized. To me, I thought of all the string exercises as math “in a good way” and that made it pretty easy for me. Speaking of exercises, you best get on to them!
Overall, I feel like I am getting it pretty fast especially compared to other languages. The exercises went well, I had some formatting issues (to be expected) but otherwise I did pretty good. Excited to return to the Google Python Class tomorrow. Also, just saw that Team Treehouse JUST launched a Python course…I think I might do that next.
NOTE: New Landing Page coming soon!
There is also a Writing section with prompts (not pictured). Stay tuned for my other projects.
Topcoat allows you to pick out cool nail art, find a nail artist, book it, and pay without even pulling out your card or crash. I love when tech mixes with beauty! I got my nails done at their studio in SF at the Crocker Galleria but with the app you can have the artist come right to you if you prefer. Parris was my artist and she did an AWESOME JOB. Loving it. Check out their site by clicking on the photo
This excellent article from Eran Galperin, CTO of Binpress, goes over some great tips on choosing, using, and maintaing APIs in your apps. I strongly recommend this read for anyone from newbies to the seasoned programmer as we can all learn from it.