Showing posts with label inaccurate lists. Show all posts
Showing posts with label inaccurate lists. 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. 

Sunday, August 31, 2014

My family and I love food. Yes, some of us may be picky and some of us may want our rice and meat served separately, but we indulge in the delicious blessing of being able to eat good food as much as we can. It has always been Shakey's that we go look for when we visit big cities, though, specifically the one in SM Cebu near Northwing since that was the first branch we ate at a few years ago.

The Shakey's Branch at SM Cebu my family and I fancy (Photo © Amuse-Bouche)

Naturally, we still visit other restaurants to keep exploring and to try out new dishes so sometimes, we choose those restaurants instead of Shakey's, but my point being, the number of times that we have eaten at Shakey's would probably be greater than the fingers on both your hands and here's why:

1) Their Chocolate Shake is to die for - That was typically number one on my list. When that first drip of liquidy chocolate goodness touched my taste buds, I was on high (not literally). It was like ice cream and chocolate but better. Every time we eat at Shakey's, that order has to be on the list. There was one time they ran out of stock for it since it was near closing time when we came in, I felt so dejected that we left and ordered takeout instead (Sorry, Shakey's).

2) Mojos make my jojos - What are mojos, my friends may ask? They're coins of heaven graced down to us mortals by the potato gods. This is my second favorite order but I can live without it.

3) Awesome budget meals - It's like they have plans for everything at reasonable prices and a very decent servings. I had lunch with team Symph at Shakey's, there were about twenty-eight of us, by the way, and we had a full meal and even some leftovers for everyone at a good four thousand something pesos! (plus I got to use my Shakey's super card which was awesome)

4) Friendly staff and quick quality service - Granted, it only happened once that we had to wait for our pizza for about two hours but they gave us a complimentary banana split to make up for it so to me, it was good. Other than that, you'd usually just have to wait five to ten minutes tops before your orders start flying in. Staff always greet you with a smile and make sure their guests are comfortable. There was this one time in the Shakey's branch at Cebu IT Park that the waiter went out of his way to just freaking open the door for me before I entered and that really made me remember why I loved the restaurant so much.

5) Succulent chicken and clean tables are sexy - Yeah, that was a weird title but so true! Their chicken doesn't taste as good if it's a day old and microwaved though so I go against that. You're destroying the experience! Sitting in one of those Shakey's tables that stable (not wobbly unlike my experience in The Brown Cup), comfortable enough and, most importantly, very clean (as far as my experience is concerned) sets the mood just right.

Blog Archive

Popular Posts