My future as an engineer

--Originally published at Nihilistic Kirby

Resultado de imagen para kirby super starOne of my earliest dreams definitely was to create a videogame, I was fascinated with all the magic the SNES made me feel back in my childhood, and since then I wanted to make my own story with all the ideas a typical kid would have. Of course it was a beautiful childhood, and I still have remains of it; maybe it was the only reason I choose to study this career. However, as the time passed my idea constantly changed, maybe because of my interest in art. I’ve always wanted to be an architect too, even if both careers are too different things.

I’m not sure what I want now, I don’t want neither take so long in order to make a decision nor study something that I don’t feel fully comfortable with. I think this semester would be the one I’ll take that “decision”.

Engineering or architecture?


Lists and Tuples

--Originally published at Nihilistic Kirby

By this point you should already know how things work on python, and be familiar with certain input. So when we talk about “lists” the concept of parentheses takes place as main need for this topic.Resultado de imagen para parentheses and brackets

But what exactly are lists?     Well, in order to know  this, there are some type of arrangement between parentheses, brackets, or braces (although braces are more often used in dictionaries (I’ll explain that later)) so you can store certain type of data (strings, integers, etc.) inside of a DATA STRUCTURE.

So, basically:

Lists are the most basic type of data structure in python, an is often represented as many comma-separated-values inside of brackets like: list = [1, 2, 3, 4, 5 ]. And every value has a specific position inside of the list, that can be iterated by refering to its position.

https://www.tutorialspoint.com/python/python_lists.htm

And tuples…. tuples are often confused with lists, but there are more advantages at the time of use them, such as: their easy use for different data types; tuples are immutable, this makes a tuple “easier” to read when there is an iteration; the data inside of a tuple can work with dictionaries too; and this data is secured and cannot by changed by any instance.

Inside of this link you can find some coding examples for tuples in python that can be run in the page: http://www.programiz.com/python-programming/tuple


Bank Interface (Absolutely not like a pro)

--Originally published at Nihilistic Kirby

So yesterday I started writing a code where I could mix the basic command to display a message “print“, variables, inputs input, the type conversion functions like “str (to convert inputs into strings), int (to convert inputs into integers), and float (to convert inputs into numbers with decimals)”, also a simple loop using while and True (I honestly don’t know exactly how to describe this type of command; however, I got a logical idea, which I can’t explain, that helps me to understand the use of it.)

So before showing and explaining how frustrating for me it was to work out all of this, here’s the interpretation of my code using the terminal for Windows:

banko

You may already have an idea of how this works, however, I’d like to share how most of my code works (using a picture because I still don’t know how to correctly write down the code, lol):

bankvisual

Notice the use of a function in order to call the menu every time after any option (a, b, c, or d) is executed.

The most difficult part of this program was to update the variable ‘balance’ as the other two variables (‘deposit’ and ‘draw’) changed, but at the end it was logic and a little help of Martín (ISC’s director) what made me finish what I was planing to do. I won’t lie, it took me about an hour to finish it, because I haven’t programmed anything in python or another languages ever before, but the satisfaction of getting something  (despite the code is too small) done is what makes me keep trying new projects every single time, even if I’m about to lose my mind.

 


More modules

--Originally published at Nihilistic Kirby

One of the things that were ‘complicated’ for me were python modules, not because of the simple use of them, but the logic behind them were like a mystery to me. However; after a hard time of scavenging information from the darkest places of THE INTERNET I found a site full of tutorials where a list and explanation of several modules are (please, check the link, they deserve a lot of credits because of their great job):

~~~ http://www.tutorialspoint.com/python/python_modules.htm ~~~

, and I’m telling this because I found that great site, in a place called ‘Google’ (what a weird name) where I could type what I wanted to search for, here, I share that link too:

~~~ https://www.google.com ~~~ ***AMAZING SITE***

Now I feel more like a computer scientist, maybe I’ll be ready to hack the Pentagon next week, so stay tuned


First “complex” code

--Originally published at Nihilistic Kirby

The third week of the semester I wanted to do something more complex than just >>>print(“Hello World”). Since I started using the command “while” things got a little bit more interesting; however, I still don’t have much idea of how things work on python, I just don’t know which way to go and what should I try to learn next, things can seem pretty simple most of the time, but for me they are not.

planets


LIBRARIES

--Originally published at Nihilistic Kirby

I don’t know how I believed libraries were complicated. At first I thought they were some kind of complex code expansion, but they ended up being just another way to write things, like the command “>>>import math” in python, that makes the user capable to write “>>>math.sqrt(x)” to calculate the exact square root of any x number, instead of writing “>>>(x)**(1/2)”,  which can be a little more complicated. However, libraries aren’t such a great option to use (at some times) because the more of them the user uses, the heavier the code gets. This doesn’t mean that they’re not useful, they give the editor and the language itself great extra capabilities in order to use python in another several programs that require special commands, making python a diverse language that can be use in almost any application or whatever, just by having the correct library that can help.

(Sorry for the awful English, I’m almost dead because of my recent lack of sleep)

Here’s an example of the library known as ‘math’:

library


>>>for meow

--Originally published at Nihilistic Kirby

The most recent command for python I’ve learned is >>>for , and since I haven’t thought of a good use for it yet, here’s a cool example of what a cat would write on its own code (as my own interpretation told me):

formeowcode

Hoping the image is clear enough to read, there’s the example of the code I’m using to represent the command >>>for

And here’s the execution:

formeowex

In natural language this can be expressed as ‘For each given Meow, show a Meow followed by an order number’.


“Cubing” and “Coding”?

--Originally published at Nihilistic Kirby

As a newbie in the programming world, and despite being a Python beginner, I literally have NO IDEA where to start, and I would really appreciate any kind of help that could help me to have a better understanding in this confusing (at least for me) ocean of languages and algorithms, like sharing helpful books, video tutorials, etc.

With that being said, I’d like to share and experience that keeps making me wonder how much can I get familiarized with this whole new world: It’s been like 5 years since I first started solving Rubik’s cubes, and that was the way a learned how algorithms really work, as all the methods to solve any cube require algorithms. Of course it’s complicated as hell to solve the cube the first time, but as the time passed I became better (as it is supposed to be, I think) and I developed my curiosity about new cubes and algorithms, so without even noticing, I learned by first “language” in order to understand those algorithms, and then this Rubik experience helped me to decide which career to choose. So here I am, and I’m  not turning back, even if that means hell for me for the next 4 or 5 years.

(Yeah I know, I’m not the best writer in the world)