2015/09/08

Weeks 3 and 4: Databases

Weeks 3 and 4 at Epicodus JAVA/JavaScript/Android program were all about databases.

The good news is that yes, as expected, RESTful routes, Spark and CRUD have become familiar, integration testing and unit testing are becoming second nature and it all flows really well. Postgres, many-to-many relationships with Sql2o? Got it. As a prospect student, having all of this thrown at you in just a couple of weeks may seem a bit intimidating, but it works out. It is true what they say about working your way through problems and making sense of things as you go along. It sinks in. At some point along the way, it just sinks in. Plus, I can’t say enough good things about pair-programming, it works, it’s magic, I don’t know why I was ever scared of it.

The bad news is that we’re now deep into our interview-prep, which means leaving the nice comfy Epicodus bubble and dealing with real-world tech industry cover letters and technical interview questions.What is Downcasting?What restrictions are placed on method overriding? What is the difference between creating String as new() and literal? See what I mean?

A good way to start preparing is by digesting some intro CS courses, like edX’s Harvard CS50 (https://courses.edx.org/courses/HarvardX/CS50x3/2015/info) and Coursera’s Stanford CS101 (https://class.coursera.org/cs101-selfservice).

Ok, time to work on that cover letter…

2015/08/23

Week 2 at Epicodus JAVA/Android program


The second week of Java was hard.

Working with objects within objects within objects, think Inception of Objects. Add RESTful routes with Spark and yes, what a complicated maze!

On the plus side, those mazes led to some interesting projects, like the Tamagotchi and GoFish. Each of these particular projects taught me – through trial and error and error and error and blood and tears – these two fundamental things:

1. DO NOT try to manipulate time. If objects within objects lead to Inception of Objects, starting a counter in one of those classes and trying to manipulate it from another class can create parallel dimensions which lead to your Tamagotchi dying terrible inevitable mathematical deaths. Other pairs were more successful by creating a “click here to make time pass” method.

2. Removing items from ArrayLists while looping through them is not as easy as it sounds. The safest way we figured to do that was to store the items you want to delete in another temporary ArrayList and then remove this temporary ArrayList. It’s tricky. There are many questions about it on stackoverflow, we looked at the documentation a million times but I we didn’t find a good enough answer. For now, I’m keeping the temporary ArrayList trick in mind, hoping something better comes up in the near future.

But hey, the week wasn’t just blood and tears and dead Tamagotchis and ConcurrentModificationException, we also started pushing functioning projects to the web through Heroku! So here you go, my first project to go online and this week’s Code Review challenge, a Dictionary app: https://blooming-sea-3658.herokuapp.com/

You can add words and definitions and ok, it’s not very useful because they’re gonna disappear when you restart your session since they’re not linked to a database. Yet. Because guess what, tomorrow we get started on SQL!

Week 1 at Epicodus JAVA/Android program




Hi there!

My name is Juliana and I arrived here from Brazil 3 weeks ago. I spent 2 weeks exploring this wonderful city of Portland - OR and coding in coffeeshops, and now the JAVA/Android program at Epicodus has finally started.

This first week at Epicodus has been challenging in a very good way.

Everyone must complete the pre-work on their LearnHowToProgram.comwebsite, but obviously not everyone is exactly on the same page. That’s why pair programming is challenging. They randomly assign our pairs for this first week and it’s been interesting to work with so many different people. I was a little worried about it before the program started, but now I can see the value of this format.

As for the programming itself, I started out with I guess “good enough” notions of the basics (variables, loops, data types, that kind of thing) and some very vague notions about methods and objects. I feel like here you do a lot of things before you actually understand them. Well, that’s how it’s been going for me anyway.

Little by little things start to sink in: variable scopes, frameworks, testing, Hash Maps, Array Lists… Just please don’t ask me to explain frameworks and compiling just yet. They’re still in the “vaguely aware of their existence” territory for me. I have been using them successfully, but I just can’t explain how they work exactly. In the back of my head, I’m anxiously expecting the day when it will all just “click”, you know? For now, letting it simmer…

This week I completed 9 little projects (JAVA_01 through JAVA_09 on my GitHub), some girls did more, some did less. These initial projects mostly deal with creating methods, taking strings or integers and playing with them a little and then returning the result to the user. We’re using templates through Apache Velocity Engine, we’re using Spark and Gradle, testing with FluentLenium. Not all of that makes complete sense right now, but they’re starting to sink in. It’s all part of the process I suppose.

A highlight moment of the week was figuring out how to capture a tricky variable on Velocity Template Engine. One of my friends here set up her project in a way that on page 1 you get the user input from an HTML form. On page 2 you return that input with some changes and finally on page 3, we should display the initial input. Along the week we’d only tried to go to page 2, so today we struggled to get that variable into page 3 and when it worked, it was like magic! Well, by magic I mean some awesome logic that was slowly sinking in for both of us at the same time. The way I see it, that is the magic of pair programming.

On that note, let me share a very useful link about variable scope for those starting out on their JAVA paths: an introduction about variable scope on Java Made Easy.