Saturday, 24 September 2016

def mathematics

This evening and what I had stumped me within and got me less interested in coding the first time, stopping me from progressing was the use of functions and how they were being taught on how to be used.

I understand the main process, defining what the function is, giving it a value and what the units have, but yet the task on the website seemed to stump me continuously, causing me dismay and doubting whether or not I could actually do coding if I could get past this basic question.

Directly from the website.

In this exercise you'll use an existing function, and while adding your own to create a fully functional program.
  1. Add a function named list_benefits() that returns the following list of strings: "More organized code", "More readable code", "Easier code reuse", "Allowing programmers to share and connect code together"
  2. Add a function named build_sentence(info) which receives a single argument containing a string and returns a sentence starting with the given string and ending with the string " is a benefit of functions!"
  3. Run and see all the functions work together! "
And what I have written so far, unknowing to whether or not I was doing it correctly, the wording stumps me and wondering whether or not I am confusing it even more, this is what I had worked out so far.

def list_benefits(a, b, c, d):
    return "More organized code", "More readable code", "Easier code reuse", "Allowing programmers to share an/d connect code"
def build_sentence(info):
    print " is a benefit of functions!"
def combination_of_sentences():
    list_of_benefits = list_benefits()
    for benefit in list_of_benefits:
        print build_sentence

print build_sentence

I am unknowing in how to get my function to properly function, the page does not show how to properly execute the script and it is highly confusing, it seems quite bizarre to me for this to be in the pages without actually showing how to make the code correctly return what you need.
Is there a need for raw_imput, or something else, if so, what is needed?

Yet I show the confusion I have fully understood what their mathematic processes are used for and how to use the.
The obvious symbols being.
+ for addition
- for subtraction
* for multiplication
/ for division
** power of " "

Also using the uses of BIDMAS, Brackets, Indices, Division, Multiplication, Addition, Subtraction.

The use of this means making the understanding of maths, and scripting will be brought together much easier, and applying it to robotics and constructing hardware makes much more sense.

This has been a rather confusing and annoying day, but hopefully helping at the same time.

Friday, 23 September 2016

Print len(python) from datetime import datetime

This evening has been a mix of strings, integers, different processes and understanding how to be able to store the dates and time of the scripts you are constructing is something I find poetically beautiful and brings the artistry into coding.
A rather technical and logical thought process is needed in creating what you desire to be done but this, it records what you have done, it shows where the error is, it shows the initial humanity in the computing architecture we are making.

from datetime import datetime

now =

print now.year
print now.month
print now.hour
print now.minute
print now.second

All showing exactly what day, date, month. Now I am intreguied to see how I will be able to find my own location, ping it out and see what pings back.

If anyone knows how this will work, I am very interested into knowing how

my_variable = "strings" + int(12)

I have today looked into the use that is used for pretty much every piece of code in the world, and the two main parts of the construct.

Variables, strings and integers.

Python is a logic based code that seems to use Boolean logic similar to something that Charles Babbage used in his difference and (theoretical) analytical engine. I am aware that the basis of all program languages is the basic logic of AND, NAND, OR etc. systems and you build the rest of your code around these. I have played a lot of Minecraft, Space Engineers all these sorts of games. That is the reason why I have a base of understand to work into, and that is what I find extremely fascinating about the whole process.

Whilst you set yourself a variable, that can either be a string. Defined by the quotations " " or ' ' which can be used as " ' ' " or ' that/'s ' and other ways I am pretty sure you are capable of. I do not see any significance in using the single quotation when compiling, the double quotation and a mixture of the single seems to me, to be the only logical solution but I may change my mind later on, or hopefully someone will explain at some point how and why.

The same feeling goes for once you are transforming either a string or an integer into the other. Unless you were specifically trying to find something, say in a folder or a file that held a specific piece of information, what purpose they would have.

The use of raw_input has shown how the possibilities of actually combing strings and integers to create a possible program that could take human input and store it to have some form of actual usefulness. The work flow within the seems to only show you specific parts and not how you can use them in actual practice, why?
Does anyone learn coding not to actually do anything with it, and if so, once again. Why? So this process once again seems to show very little need to keep going.

If a child learn how to speak Klingon, even though the one who taught him will speak with him, he will soon realise that it has no basis or actual purpose in everyday life so stop speaking it, and go with the tongue that is most spoken in that area.

Taking that logic, why would the home website for python not engage you into actually being able to use the skills they are teaching, practically. This is what got me starting and stopping over and over, there was no basis of constructive progression, so on my 4th time on starting again, I am still using learnpython but also learning from code academy and Khan Academy, combining these websites to get a better understanding of what I am learning.

Whilst the understanding of what variables are, and how you can apply values to them has given me a better sight into progressing into the world of coding, understand how you would start your code and what you could possibly do to make sure it works.

To tomorrow!

Thursday, 22 September 2016

print ("Hello world!")

So, a lot of this will actually seem like it's a bunch of tutorials that I will be regurgitating from, and whatever other code resource you can find.

Because... It is, this is me recording my process and seeing what each part of the code will produce.

Starting from any python resource the same as any mmorpg tutorial, the grinding of rats becomes the initial print ("Hello world!")

This got me initially thinking on how the pull of python has gotten me wanting to code.

The first tutorial is not just simple, basic and anyone who has the ability to type using a keyboard can do it, so, why can you not carry on doing it? But, doesn't this also make an illusion of how simple coding actually is, will people get annoyed and angry at how quickly Moore's law kicks in, each step increasing with difficulty quite quickly.

Unlike 3d software, animating, building hardware the level of complexity seems to always be quite steady and is only as complex as the task at hand yet coding, developing and hacking, they all seem to be varying incredibly at the level of difficulty.

Hello, World!

The initial steps show you how to set a step to a variable.

x = 1
if x == 1
    print "x is 1"

this obviously means, if x is equal to 1, print 1.

But yet if you go into IDLE.

x = 1
if x == 1
    print "x is 1"

SyntaxError: Missing parentheses in call to 'print'

Is what you will see, and the same I have seen with code academy. Does this mean the online services are not updated regularly or that the skills are that easily transferable with you don't necessarily need to know what each update of the python interpreter or do they see the update as vital?

I have only just started learning so I am going to keep on going but yet this does not seem to be something that should have been looked over so easily. I have abandoned the website but gone to code academy instead.

name = "first post"

So,  my name is John Doe, or at least it is for this anyway.

I am a student somewhere in England, currently not learning any form of computer coding or language based course but something not so different.
I have always had a fondness for computers and the way they communicate from one another, if it's a laptop, a phone or a calculator. The bizarre and inept ability they store within themselves to do be able to somehow speak makes the whole computing world quite interesting.

My actual course involves python, a programming language that I have heard whisperings of in the great wide (small) world that we are all currently engaged in and way past beta testing: because the whisperings of the language has been placed around, I always wanted to be able to communicate with computers.

From a young age I have found them great because if there was something wrong, or the computer was not doing what you expected it to, it is probably your fault.
There is no pushing of blame, there is no shift of responsibility and they, a lot of the time if you know what you are looking at and or for it shows you.

I could always find the virus that popped up on my tower when I was a kid, help someone find the right thing they were looking for on the Internet, teach someone how to use a piece of software no problem and it all sunk in pretty well but I was never told truly about what programming was, or how you could get involved in it.

So about ten or twelve years later, I learnt about all these different languages; Java, HTML, Python, C, C+, CSS, Binary and my mind exploded with the possibilities I could produce with all of these different things, the combinations of what I could do.

Then I started watching the very popular Mr Robot, and looking into the source code for WhatsApp and what their solution of the anonymity problem and I was once again, breath taken, I needed to learn how to do the stuff that these guys were doing, I could become apart of the next robotics team, or help create the next super phone, be apart of the technological evolution of the human race.

That's when I decided, I am going to start it.

This is a blog about me, and my progression with coding, developing and hopefully mechanical production, each upload will either be what I've learnt about coding in python, or maybe another language, what I have made with an Arduino or rather for me Genuino, maybe even some raspberry pi stuff. It will be consistent (hopefully) and might also involve some of my own university work.

I am learning, and will continue to learn for as long as I can, the process is continuous and the loop might be finite but it will happen, nonetheless.

Enjoy the blog if you are reading, this is for me but if you do read it, please. Enjoy and don't forget to poke me if I am wrong or might do better somewhere else.