Showing posts from November, 2014

Goodbye Cygwin

Today, I say goodbye to Cygwin for developing Rails apps on Windows.

I'm sure it's a good tool for other purposes, but setting up a Rails development environment on Windows using Cygwin will be the death of me. AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH path issues, rvm issues, gem notfoundexceptions, certain gems not working, conflicts .... wtf?! No wonder people recommend using Linux VMs instead of doing Rails on Windows. I learned the hard way. Great.

The first thing I'm going to do as soon as I become a full-time developer is to get myself a nice Macbook T_T  Windows is not my friend for iOS and Rails -_-

Windows, you've been with me through the thick and thin. Thanks for being there.
But I guess it's time for me to grow out of my boyhood.


*Ray is an awesome iOS tutorial website with lots of helpful information. Below is just some notes I took from his cocoapods introduction with my own summary notes. Hope it helps.

CocoaPods basically help you better use other people’s code in a cleaner, easier way.
It's a dependency manager for iOS/Xcode projects that resolves dependencies, updates libraries and helps manage your external libraries better. CocoaPods is MAGIC at your fingertips.

*The alternative is trying to copy and paste code from Github into your project but that will become very messy after awhile and not scalable at all :(

 Imagine you are banging your head against the wall trying to implement a special UI effect for your app. You just spent 10 hours on it, and it doesn't work. Turns out somebody else has a similar effect on Github, but it won't even run correctly in your XCode because of all its dependencies. AHHHH, horrible, r…

Startups vs. Big companies for young intellies

3 years out of my BSBA.
There seems to be some trend among my peers who went through the same business program.

About half of my smart friends ended up going into start-ups. Sure, they might not have gotten into Goldman Sachs or Google in their first job out of college, but instead, after getting a couple years of experience, they opted for the fast and the furious start-up lane.

I think that's a seriously smart move. A lot of them felt like they weren't utilizing their potential in big old companies that were stagnant in their growth and set in their ways. They felt like a small cog in the machine. Now, they work as market analysts, product dev, new business dev ... getting to touch many moving parts. They work long hours and learn a ton every single day. I find that admirable and exciting. (I'm sure I don't know all the unglamorous bits, but I respect their choice nonetheless).

I guess it's not a surprising trend. We are currently in the app development/technolog…

Week 13 Working on my own iOS app

I'm juggling Core Data for my app and it's been kind of a pain. For example, I have a many-to-many relationship for Core Data, and there were new concepts like "NSOrderedSets" and "Faults" that I had to learn about Core Data. Apparently, when you are using relationships for Core Data, and you want to retain "ordering" for your objects, you can use NSOrderedSets (pretty easy, just checking off a box in the Core Data model file) because you are not allowed to use NSArrays conveniently in Core Data.

I think I kinda regret not making a prototype before actually getting into the weeds of things. I just wanted to build one piece at a time, and see how it goes, but this approach has been pretty time-consuming because whenever I want to change something because I don't like how it looks, I have to rip out of a lot of the things I built, and pretty much do a whole new make-over. I guess that's the reason that people do prototypes: to save massive am…

Becoming nerdy

I was playing Taboo with friends yesterday and the word was "Static" so I said "Hey, Java public ... " ... my coding friend shouted out "Static!"  It was a great sign that I'm being more nerd-ified everyday.

It's a good thing. I was always a nerd, so I just regained myself. Ever since I picked up HTML and built my own website as a 11-year old kid, I guess I was a nerd. Perhaps, all this time, I was trying hard to pretend I'm not a nerd, majoring in business, trying to suit up and say "hey look, I'm not just a nerd, I have all this leadership, interpersonal qualities, communication abilities, I'm not just a nerd ... "

But I'm a nerd through and through. And I love it. I embrace it. I'm so glad I regained my nerd-ness at age 25. Because the times have changed. It's the nerds who change the world.

Let's nerd out to the level of Bill Gates, Zuckerberg and Brin/Page.

The Big Balancing Act

You need to work hard and build your skills so that you can become a valuable member of any organization. Especially in coding, where it's very close to a meritocracy. You need to be good at coding to survive in this world. Period.

But that doesn't mean that relationships are not important. It's been a big juggling act really.

I think it's important to reach out to others. Even at my bootcamp, most of us just spend everyday, engrossed in our own work, in our own projects and in our own small groups, never really venturing out. Sometimes, there are days when we just don't talk or say hi to each other, and just code all day.

There's something sad about that. Yes, getting into flow and being completely focused on your work is a blessing. Coding can be really fun. But it also can feel very frustrating and lonely. And if it means neglecting people in your life and just becoming anti-social in general, I don't think I want that. From a young age, I've always lov…

Week 12 More Java, Redis, Jedis, Multi-Threading and flowcharts

I learned how to use Java, Eclipse and Redis with Jedis. Maven is kinda cool - like Cocoapods for iOS but for Eclipse.

We are using Redis for one of the apps we are working on, and right now, I'm in charge of implementing a "Notification queue" system where we store a whole bunch of "Event" objects into a Redis list whenever something "happens" in our app. So for example, if a user has "liked" a "comment" on our app, then that should be turned into an "Event" object that is then stored in Redis as a form of a hash. WHEW, that's a mouthful. If you had told me any of this 1-2 months ago, I would be looking at you like "HUH!? YOU CRAY CRAY ON CRACK". So I'm trying to figure that out, step-by-step, drawing out user use-cases through a flowchart in the mean-time.

It's getting very busy though. I'm getting behind, wanting to work on my own app and etc. I wonder how I will be able to keep up with intervie…

Great quote

I shall pass this way but once; any good that I can do or any kindness I can show to any human being; let me do it now. Let me not defer nor neglect it, for I shall not pass this way again.Etienne de Grellet
Quaker Missionary

How to run a JSP file on a Amazon EC2 server instance using Tomcat

Easier way with using manager webapp
Start an amazon EC2 instance from their dashboard (it can be amazon-linux instance or ubuntu instance for this example) Make sure you set SSH settings correctly (port 22?) under security groups Make sure you got public key and private key correctly. Then click Connect while having your instance highlighted in the aws dashboard, and follow instructions to ssh into your EC2 instance sudo -s (or sudo su does same thing) makes you root sudo apt-get update
update your server Install tomcat7 and tomcat7-admin sudo apt-get install tomcat7 if you dont install the admin stuff below, you can’t even access the web application manager (manager webapp) sudo apt-get install tomcat7-docs tomcat7-admin 7) Now, we need to set up admin credentials to access the manager app: sudo nano /etc/tomcat7/tomcat-users.xml
This file is filled with comments which describe how to configure the file. You may want to delete all the comments between the following two lines, or you may leave …

Goodbye to Naruto

An epic 12-year saga that touched and captivated people all over the world with its stories of friendship, persistence, growth and determination.

I am so sad that it's over.

Thank you, Naruto!

Giving presentations

Today's assignment was to give a presentation in front of the class about a technical topic. Reminded me of high school! Sounds like a small thing but I was actually pretty excited, because it's been forever since I gave a presentation by myself. The last time was ... probably doing an open mic for stand-up comedy almost a year ago and doing a presentation for sales last year. I had missed it.

All this coding had made me forget about public speaking. love for stand-up, being on stage, how much I enjoy it. That's why I would love to teach in the future too, in a classroom setting.

Maybe it was God's reminder.
I shouldn't forget.
I want to join Toastmasters as soon as I settle down in coding.

Week 11 Another week

This week has been about going back to Java and learning about Redis. Glad I studied up on some Java basics back in the end. I learned about multi-threading, runnables, etc.

Also worked more on my own original app, setting it up with Core Data and making its tableview. It's been kinda hard multi-tasking: working on an internship with deadlines as well as trying to develop my own app. Sane people usually don't seem to do these 2 things at once ... so I'm going to have to prioritize and keep myself sane too. Hopefully I can put in some good weekend coding time this weekend.

I am sad to say that there's some material in Week 6 to Week 7, that I don't remember very well now at 5 weeks later ... it was probably a month ago when I had to deal with Amazon EC2 servers and setting up Tomcat ... I forgot all about it because I had some online tutorials to rely on but now, all the links are gone and I'm stuck with just a bunch of vague memories -_-;

Some of my peers at the …

iOS AddressbookPull and MultiSelect from SearchDisplayController

Few tips

1) Working with C-based AB-prefix classes for addressbook can be a nuisance :(
2) Search Display Controller has been deprecated in iOS 8.0 so be aware of that (it works fine here but I'm sure there's a newer alternative T_T )
3) Checkmark flag logic can be refactored better -_-;; my bad.

Core Data Quick Summary

Core Data is more than just a database. It takes care of everything from saving, validating, undo-redo support and more. Using alternatives like cloud storage, SQL or NSUserDefaults is not as effective as CD because you have to do a lot yourself, learn SQL queries, need internet connection, need encoding/decoding ... etc.

Core Data lets you save your entire object graph very effectively and pull data out + many functionalities. Perfect for complex apps.

"Managed" objects are Core Data objects.
They are "managed" by Core Data

**Checking off Core Data box when you start new project is the easiest way to insert Core Data. You can do it manually but it's a lot of typing.
- It comes with a bunch of code that also allows you to automatically save when you quit out the app (in the app delegate shouldTerminate delegate)

XCDataModel is a contract between Core Data and the app.
It's our managed object model - if we want to manage something in CD…

New-found happiness

As 2014 is coming to an end, I really feel like I've lost the track of time. I cannot believe how fast time has gone this year. It was around March or April when I consciously decided to move into coding. It seems like yesterday. It's actually been 8 months.

I don't feel that young anymore. I see so many kids accomplished and established at age 25, 26 with good years of experience under their belt and maybe a promotion or two in their own field. Many with a 1 to 2 year master's degree.

I feel behind, as I've spent the last 3 years looking for a vision instead of digging a single-path like those peers. Although I had very interesting and maturing experiences exploring stand-up comedy, IT sales and coding, I can't say I have much to show for those efforts. It's probable to think that employers will think me at the same level as those kids who graduated college as class of 2013, 2014.

But despite all that, I'm truly grateful that I ended up in programming an…

Yelp API!!!! WOOT

If anyone needs help implementing the Yelp API into their objective-c app, please refer to the repo above!

Thank God for Github. Initially, I found someone's library that deals with making Yelp API calls through iOS but it was using manual memory management (from code back in 2008!!) so I had to make everything into ARC (just deleting a lot of lines of code).

Now it works even with ARC!!! GOD SO HAPPY. Yelp API was causing me a lot of trouble due to OAUTH so I'm glad that I got it working. Could not have done it without my peers here at the bootcamp who showed me the easiest way to do it ... T_T If I didn't use the library, I would have had to build something that deals with OAUTH which would have SUCKED OUT MY LIFE so I'm glad I didn't have to wrestle with that.

Perhaps that's why your colleagues are so important in this craft. You can help each other, he…

Breaking down big problems

I've been on the internship for a couple weeks now. Working with real people on a real app idea has been really exciting.

The bootcamp itself has a very interesting structure. On this internship, I feel like the students will be forced to adapt very quickly to a real project. Our abilities are tested right away. Can we meet deadlines? Can we learn concepts quickly and produce? It's basically a race against time. But it's also exciting at the same time. It's a lot better than back in the summer, when I was so confused trying to teach myself at home - not sure about what next steps to take.

I realize again how valuable mentorship is. I've listened to a Brian Tracy interview again recently. He said "we will never live long enough to learn it all for ourselves. We need to learn from those who have gone before us. That is the most importance advice". And it's absolutely right.

I've gone through 2 assignments already, and they both basically dealt with bui…

hump after hump

Every time you think you know something "Oh I got this", "Oh I got a good handle on this now", "Oh okay now I can build this easily" ... something breaks horribly and you realize again how little you know.

You climb one peak and next one shows up.

Humbling journey.

Week 10 My own iOS idea + internship + review Android

I cannot freaking believe that it's been 10 weeks since I started this program.

There's people of different backgrounds here. 20 year-olds, 30 year-olds, 40 year-olds, accountants, past programmers, college dropouts, career changers .... I'm glad to have met them all. We are all going through the pain together. I'm sure some of these people, I will be able to keep in touch as we move through this career track.

I started working on my own app idea. It's been really fun. Now, instead of listening to someone else telling me what to do, I can do whatever I want. And that's humbling and liberating at the same time. I tell myself "Yay, I can do whatever I want now!" and at the same time, it's like "Shit, what should I do?" It's very ironic. Freedom comes with its own responsibilities.

So now, it becomes more about my own imagination, determination and self-initiative. Can I get myself to work on this for the next 3 hours? Can I get myself to…