Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Sunday, October 26, 2014

Obviously I still have a lot to learn about the language and it's application, but being exposed to it for the most part of my internship at Symph, I CAN say though that I have a pretty good grasp of the language's basics.

I greatly referred to Learn Python The Hard Way when I first started, as referred by Albert, and it's safe to say that for those interested in learning Python, their modules are the way to go. Not only have I personally experienced the course's effectiveness, but so did many of the professionals that apply the language in real-world projects when they first started out.

PizzaPy is a meetup group that gets together every month for an evening of pizza, beer and Python. Veterans and beginners freely enthuse about the language and often have a main topic to talk about every meetup. Although being aware of their gatherings for a while now, the celebration of their first anniversary was my the first time I actually participated in a PizzaPy meetup.

PizzaPy's First Anniversary celebrated at The TIDE

The whole day workshop was packed with interesting topics for both Python veterans and beginners alike. It began with a Python for Beginners talk, enough to help us survive the day at least, and then was eventually followed by A Sip From The Flask and a Crash Course on SqlAlchemy.

1) Python variables are Nametags

Many programmers visualize variables as containers of values that they want represented.

Python, instead, uses variables as similar to nametags, pointing to the objects or values they want to manipulate. Python creates the value first and then associates the variable to that value. If another variable has that same value, it is again associated to the already made value.

There is no duplication of values in Python

2) Python lists are "arrays on steroids"

As Daryl, PizzaPy organizer and first speaker, colorfully put it. Python's list is equivalent to Java's array, with a little perks. For example:

array = [1, 2, 3, 4]
and printing array[0] will obviously print 1, right? Now try printing array[-1]. Using negative numbers as indices for the array is acceptable in Python. Their output will be the nth element from the last end of the array. In this case, it's 4. Neat, right? A few other tricks:

print array[1:3]
>>> [2, 3]
print array[:2]
>>> [1, 2]
print array[2:]
>>> [4, 3]

3) Four Spaces is Best

It was in this event that I realized that in programming etiquette, when indenting your code, using four spaces is best rather than simply using TAB (which I am guilty of).

Snippet of code from a project in Sublime Text 2

Reason is that every PC has its own set of spaces for TAB, it could be five or six spaces by default. So when you use your TAB, your code may look right in your machine but when another coder views your code, it'll look totally messed up if his TAB is set in a different number of spaces.

Why is this so important in Python? It is because the language does not have any braces({}) to denote blocks. The interpreter greatly relies on the indents to identify each block of code.

4) The Difference between "..." and '...'

Basically nothing, in general. Single-quotes and double-quotes practically work the same way in Python. The difference, I learned was:

print 'someone is "happy"'
>>>
someone is "happy"
print "someone's happy"
>>> someone's happy

Use single-quotes when you want to display strings with double-quotes and use single-quotes when you want to display strings with single-quotes.

5) Flask was fun

Flask is a microframework  for Python based on Wrkzeug, Jinja 2, and good intentions. *

Steve, the second speaker, did a great job with introducing us to Flask. I used Google App Engine for Askbuildshare and I'm still a beginner at it so I'm not quite sure how it compares to Flask but Steve, when asked about Flask's scalability, said that their systems "haven't crashed yet" so I'm assuming Flask is reliable, at least for some apps that aren't heavy-duty.

My first Flask-run app, made with a lot of help

Trying it out and getting it to work was a really fun learning process for me and I'm looking to explore on it more, just to get a better sense of appreciation for the framework (then again, I still have Google App Engine to mess with so this will still be a while). If you want to learn more about Flask and it's applications, check out Steve's A Sip From The Flask. A very fun and cool intro to the framework and definitely work walking through.

So as you can see, I've only skimmed the surface of what I should have learned at the event/workshop and I definitely still am a sprout in the forest. I was quite happy to know, though, that majority of the event's participants were also beginners in Python like myself so I didn't feel too left out (although a lot of them were already masters of other languages in their line of work. meep). The event was smooth and fact-filled and was a day well spent. Hopefully I'll get to attend more PizzaPy meetups in the future and get to relate more with the hardcore programmers in events like these. 

Wednesday, October 1, 2014

It has been five months since Clint and I joined Symph as their newest Creative Interns and I have to say, it's been one hell of a ride. As I'm writing this, my time with Symph as their newest intern is ending. And in this post, I'd like the future me to know that whatever might happen, after I graduate university or when I seriously pursue my career, that my experience here in Symph had been a great one.

My story with them started two years ago in my first ever Startup Weekend Cebu. Dave, one of the Symph founders, approached me after my team mate, Lawrence (who ended up being my co-intern two years later), presented on Sunday Night. I vaguely remember Dave asking me if I did the graphics for our team and if I was still a student or not. Ever since, I've kept in contact with Dave and Albert and some of the Symph team members in some way and, if they ever knew it or not, they've continuously given me a source of motivation and inspiration to keep on doing what I was doing and to strive for the best.

ashley uy
Team Symph on their way to Team Lunch

Getting accepted into Symph the day we applied was like dream come true to me (statement justified by my reaction) and it's hard to believe it's been five months since then. I can justify that the time we spent with them weren't all fun and games though. On the first day we officially entered the then old Escario office, we were tasked to help with data entry in one of the Wordpress sites the company was developing at the time. I was already familiar with it's interface, being in charge of media during Startup Weekend Bohol, so I was pretty ok with the task, as opposed to my friend who had looked at the dashboard for the first time.

ashley uy
Francis and Kai shenanigans

The following days were Albert, one of Symph's founders, getting us to learn Git, Python and Google App Engine and how it all plays out together in development. Clint opted out of the program and decided to focus on his design, working with Dan, the company's Chief Design Officer. A lot came out of that study for me. I learned how to apply what I learned in a working environment and I got to understand what it takes to be a developer in a startup (at least a taste of it). Albert assigned to me one of the old startups the company used to work on as my project for this internship. Askbuildshare is basically a list of problems and possible solutions that the public can access and validate or possibly help solve.

It started out that way at first but then, after a long talk, pivoted to a tool to help manage thesis projects for teachers and then pivoted again after testing to the original idea. The direction we wanted to take was that the higher ups in the academe would approve of the system so students can use it as inspiration for their thesis works. I went through the whole process myself from the development to the testing, leading up to the launch.

A lot happened in those months from staring at code for a whole weekend, trying to fathom where that id led to, to ending up deleting two months worth of code only to go back to phase one. The lessons I learned in that process were immeasurable though and I wouldn't change any of the challenges I faced then even if I could.

ashley uy
We are OKr

Of course, the fun part about working with a startup is the ability to see it grow and work on other projects that could possibly make the company big. Clint and I witnessed one of the company's milestones when we upgraded from the Escario office to the The TIDE, we've seen co-workers and friends come and go in the past few months and more importantly, we've got down and dirty with Symph's most recent startup, Outdoin.

We've obviously upgraded ourselves, practiced, watched tutorials, lazed around by ourselves or with other co-workers and just generally bonded with the team. I learnt so much in my stay with them and only hope to extend my experience with the company once I've graduated. A lot can happen in one semester and I can only hope Symph will miss me as much as I'll miss them. Thanks, guys v(=∩_∩=)フ


Blog Archive

Popular Posts