youre just not cut out for computer science

sometimes you may wonder if youre really “cut out” for computer science, or programming, or computers. perhaps you think youre “only good enough” for some things but not others, and for the moment that might be true.

at least some things are really as hard as they look: i doubt i will ever understand encryption on a level that allows me to contribute to the field. but its interesting! so i try to understand at least the basic concepts.

the good news is, not having a phd-level understanding of encryption wouldnt stop me from entering the computer science field. and its worth mentioning that although i enjoy numbers when paired with computers– i really dont looooove math. encryption is heavily a math thing, so i dont think i have enough interest to fully grok encryption.

but i do have options, and mostly im interested in solving computer literacy– not just applications use, but really understanding the essence of computing as well as the reading and writing of code. thats what i care about, so thats what im cut out for. (maybe.)

what im trying to say, is that there isnt necessarily much point in dedicating yourself to something you dont love. if you love something– that matters. if you love something, and dedicate yourself to it, maybe thats what youre really cut out for.

and if you love computers, you should keep going with that. i think people get discouraged by the idea that some people make it look so effortless… its never effortless!

if someone looks at hundreds of lines of code i wrote, they dont know that its the longest code ive ever written. they cant imagine the times ive struggled to grasp concepts that were foreign to me. they dont know that it wasnt all easy, or the amount of criticism ive endured from people who needed to put my efforts down to feel better about their own.

ok, i admit this: i did start young. i did find “hello world” to be magical and easy to follow. my first year of coding was a piece of cake. but so what? my first year of coding was stuff like 10 color something, 20 print something, 30 goto 20! ive seen lots of people who never coded before do more in the first 2 weeks than i did in the first year!

i just kept doing it because i loved it. and if i didnt love it, if it wasnt interesting, i wouldve done something else with the years ive spent learning. but that doesnt mean it was easy.

im not a “natural” and im not cut out for computer science, because no one is. people who work really hard are more cut out for it than i am. people who are good at math are more cut out than i am. but lots of people that are good at math are also “terrible” coders. there are simply no guarantees.

its simply not about being cut out for anything, its about what you love. if you love computers, if youre interested in computers, follow that. if theyre difficult, that doesnt mean anything at all. if youre struggling, you must care enough to do what youve done so far. if something gets easier, you probably worked to get to the point where it was easier.

i grew up watching a lot of science shows on television, utterly fascinated with everything that happened in a lab: electronics, computers, chemistry, robotics, engineering, physics– anything that involved exploring the future.

the funny thing about computers: ive never heard any other branch of science talked about so often in terms of whether people are cut out for it or not. when i was a kid, they wanted everyone to be interested in science– anyone who could possibly be exposed to the wonders of nature and the universe.

why isnt it more like that for computers? people i talk to often act like a computer is just some machine that gets them somewhere, like a car goes to the grocery store. and yet you dont have to become a physicist or a phd to wonder why the sky is blue… so why dont people wonder more about computers?

personally, i think its because theres more money to be made from people wondering why the sky is blue (or other science questions) than there is from people not wondering. on the other hand, there is more money to be made from people thinking the computer is just some kind of electronic butler instead of one of the most amazing scientific tools that our species ever created.

this is a problem that needs to be solved. people should get a sense of wonder from computing, not a sense of dread or incompetence. the computer still has a cultural stigma, but the stigma has shifted from the person who loves it to the subject itself! yet what better push is there for science and future scientists than a sense of wonder? what better push is there for computer science than a sense of its pure potential?

but then again, youre just not cut out for computer science. no one else really is, either. if you have an interest in computers, or a love of some part of the computer field– follow it. you will most likely find something worth doing.

more to the point, who should be participating in computer science? absolutely everyone. although some have forgotten the importance, its still the future– and everyone benefits if everyone is encouraged to participate.

we have to stop making it about who is cut out, and follow the example of quality science programming: give everyone we possibly can that sense of wonder. dont just teach people computer science: share your love of computing (yes– you too!) thats what we really need to move forward from here.



getting more girls to code is only half the problem


when i wrote this, the post over here wasnt written yet. its better, read it instead. or you know, do what you want; but against my advice. cheers.


im interested in any effort to be more inclusive. the reason is that im one of the many people that really believe everyone should be code-literate; i think without it, we risk never solving the issue of computer literacy.

if only it was as simple as waiting for the “old guard” to die off… that wont ever work; we need the old guard (which i am nearer to becoming a member of) to remind us what it was like before so many general-purpose machines were rigged into half-locked-down appliances.

to say that we need more girls coding is an understatement. and, if you look at all the people who do code, then getting a larger percentage of girls to code is still a thing we havent solved yet.

but what if you look at all the people who dont code? there you have the ultimate diversity: if you look at all the people who have never coded, there are probably over a billion females, over a billion males, over a billion children and teens, and a billion people over the age of 40.

i havent forgotten minorities, people with disabilities, im sure i could write a list pages long of the groups of people who need better inclusion; because there is no group that has “enough coders” in it already. and no, i havent lost the point that among people who already code, females are under-represented. although most males dont code either– most people dont understand code (or think they cant) and thats the problem i want to solve.

so im very interested in programs to include more people from every background/makeup/what-have-you in coding, because one of the lauded tenets of feminism is “its about equality / its better for everyone.”

great! i am looking at all the “get girls to code” initiatives i can, for ideas on how to get more people interested / welcome / comfortable with coding. and i hope to see more initiatives in the future, that make use of these ideas to get everyone interested; to get everyone to see how vital this skill is not only to their profession, but to their participation in a well-informed 21st century democracy.

and democracy (i am told) needs more of everybody, too. at least when people say “get out and vote” there isnt a group they arent referring to. everybody vote! everybody code! everybody welcome. i definitely think we need still more of that. so please by all means, lead the way… and i will be right behind you. i am still on the lookout for more ways to make it happen. (carry on…)



wordpress: a nexus for programming and education

if youre really interested in programming, you couldnt have found a much better place with a more diverse populace. i refer primarily to, but also to the variety of wordpress sites you can subscribe to from here.

my interests are in programming, language development, and education; also the intersection of these. ive searched all over for information on these things, and in many cases the subject of language development is treated as either generic (with little variation) or a bad idea. i couldnt disagree more.

i would actually recommend youtube for a taste, but you wont find as much of what im looking for there as i have during my time searching wordpress sites. im subscribed to 50 blogs already (if youre reading this, that likely includes yours) and you can find all of these things:

  • people learning python, html and css, among other languages
  • people that know javascript and php
  • people developing programming languages
  • high school computer teachers
  • university professors

the authors of not one but two languages named after leaves are here: the author of leaf, and the author of fig (thats me.) there are tons of posts about the merits of specialized languages in education (which i find very exciting.)

fig is a python translator (that is, it translates to python) but ive already found another simple-language-to-python translator here. i love when i find python-based language projects (if you want to make your own language, i think python is ideal. lisp is also very good, if youre familiar with how it works.)

also, one of the devlopers of greenfoot appears to be on wordpress. only here have i heard about “stride” and frames… which are a point between blocks-based languages and written code.

you can learn about every aspect of programming, especially beginner programming, even from an expert standpoint. i just came here to set up a blog; i didnt realize that in 2016, has such a diverse and active community.

i apologise for not linking to anything in this post, but i would encourage you to have a good look around. use tags like code, coding, programming, education in your reader. and if theres anything like what i mentioned that youre looking for, i would be happy to try to help you find it.

regarding youtube, video tutorials seem very popular (and look extremely helpful) these days; there are so many. for discussion of programming and the development of new ideas, i havent found anything as exciting as wordpress. keep exploring: theres great stuff here.

using fig to implement a neat pattern

i found this program yesterday: pola bintang pascal | selamat datang. translator says its indonesian. i liked it so much, i made a version in fig:

# fig version of this lovely design:
# public domain

# i did not look at the code in that post to write 
# this program, i only looked at the picture and wrote
# code to do the same thing.

function pbp x
    p = 14 minus x divby 2
    ifmore p 0
        sp " " times p prints

    for p 1 x 1
        pr = "*" colortext p prints colortext 7

    pr = "" print

pr1 = "2 4 6 8 10 12 14 14 14 14 14 14 14 14" 
pr2 = pr1 plus " 14 12 10 8 6 4 2" split pr2 " "

forin z pr2
    p = z int pbp p


functions in fig and python

if youre just learning to code, functions can be intimidating and you may even wonder what theyre good for. i avoided them for years, and wish id found the right appeal to encourage me to give them a chance.

  • the importance of functions is that they help you organize and write better code.
  • the fun of functions is that they let you create your own commands.
  • the practicality of functions is that they keep you from having to come up with as many unique names for variables.
  • functional languages use them to make code more efficient and concurrent.

without knowing what functions are good for, they could seem tedious. but for what they do, theyre very simple.

first of all, a bit on terminology: i refer to a function as any self-contained subroutine with a name. now whats a subroutine? a subroutine is to your program what a paragraph is to a book; its a smaller section of code that deserves its own unit (and everything in it is related.)

that means that as far as im concerned, your print command is a function, chr() is a function: any command.

some languages distinguish between functions and subs. whats the difference? a function is like a sub but returns a value. phooey! in python (and fig) a function doesnt have to return a value, so we dont try distinguishing. also the term “subroutine” is much broader than some languages make it out to be, so lets not bother with that.

here is your function… it takes a number and multiplies it by 4:

function timesfour(x):
    z = x ; times 4 ; return z


in python its very similar, except for the fig command (which is the same as unindenting in python, so actual indentation in fig is ignored) and the punctuation is required: (its optional in fig)

def timesfour(x):
    z = x * 4 ; return z


in python you could– but probably shouldnt– do this as a one-liner: (only because it probably cuts down readability)

def timesfour(x): return x * 4


now, once weve made our user-defined function, we have to use it in the program. actually we dont have to, but why else would it be there?

in fig:

p = 7 ; timesfour p ; print
another = 8 ; timesfour another ; print
zebra = 9 ; timesfour zebra ; timesfour zebra ; print


in python:

p = 7 ; print timesfour(p)
another = 8 ; print timesfour(another)
zebra = 9 ; zebra = timesfour(zebra) ; zebra = timesfour(zebra) ; print zebra

# or:
print timesfour(timesfour(9))


so you can see how you can make and use your own functions. remember that functions in fig and python dont have to return a value? simply dont use return:

function printagain x
z = x ; print ; print


def printagain(x): print x ; print x


you can call it the same way as a “true function” in python or fig, but in python now you can call it like this if you prefer:

printagain("hello") # print twice. also works on variables.


why put things in functions? aside from the organizational advantages, and that you dont have to repeat often-used code (or hide it in a giant loop) any variables inside the function are “local in scope.”

what does that mean? it means that if you have a variable x outside the function, and you have a variable with the same name inside the function, the function will not tamper with the value of x on the outside.

which is great: variables / logic / code inside a function dont have to worry about the current value or disturbing the current value of things. you can pass one or more “parameters” into the function on the top line:

function newprint x y zebra 
z = zebra ; print
z = x ; print
z = y ; print


def newprint(x, y, zebra):
    print zebra
    print x
    print y


but the function wont do anything to variables outside the function, except the return command changing the value of newprint (once per use.)

two exceptions to scope worth noting: you can change the scope of a variable in python using the global command, and [“a”, “list”] that already exists outside the function can be changed  if it is passed as a parameter…

phew. you can see why i avoided functions for so long. but if you have no use for them yet, consider this a preview; and trust that they will be very useful and not seem so complicated when youre more used to coding.

fig covers what i consider to be the 7 fundamentals of high-level coding:

  • variables
  • input
  • output
  • basic math
  • loops
  • conditionals
  • functions

you can see why i wait to cover functions. but theyre simpler and more useful than they first appear to be. if you wait a year to learn them, okay. but dont wait a decade, like i did.

one of the reasons i waited so long was that i was able to work around using functions in the silliest ways using basic. in fig, its (thankfully) not at all trivial to reimplement those tricks that i used in basic. and python doesnt have them, so you will need functions a lot sooner than i did.

dont worry: if they dont already make perfect sense, they probably will by that time. python is the language that finally made them reasonable to me. that was 10 years ago.



punctuation (syntax) in fig

i was thinking i should blog today, but i was stuck for a topic.

then after seeing this fun post: (via punctuation in code | code monk) i really wanted to leave a comment about punctuation in fig, but it felt too much like self-promotion. so thats what i will cover today:

for teaching purposes, im a fan of languages with minimal punctuation. but i get that some syntax can help readability, up to a point.

fig only requires “quotes for strings” and #hashes for comments. this once lead to complaints that it ran together too much, so i added colons as optional : command : separators.

then i had this crazy thought: what.(if, it.()was | more ; freeform) : and people could use the punctuation they want? then you can write examples that simulate (look more like) python, basic, or bash:

py = "hello".ucase().right(2) ; print()
basic = "hello" : ucase : right(2) : print
bash="hello"; ucase | right 2 | print


fig goes strictly left to right (without parentheses, i believe smalltalk does also) but you can include real python syntax this way:

py = "hello".ucase()
    for p in range(2):
        print(py[-2:] + py[-2:-1])


by no means do i think every language should play fast and loose like this. fig is meant as an introduction to a number of programming concepts, and i could have decided to enforce stricter syntax. over time, the best option seemed to be to make most of it optional.

decimal points in the right place in a number do what you would think. decimal points in other places than numbers usually work, though to keep it working with numbers, fig cant let you be totally freeform with those.

allowed punctuation/syntax includes ( ) , . ; : |

in terms of line structure, fig is closest to bash one-liners, so the pipe | actually makes syntactic sense.

fig has two types of physical line-of-code:

  • a “shared” line that always starts with a “main variable.” (standard)
  • an “unshared” line that contains a single command (the exception.)

unshared lines are unshared to make them easier to find, and tend towards the level of importance of a line that wont “share” with already-used lines in python. for example:

if x > 5: # you can put python code to the right of this, but not the left.
ifmore x 5 # in fig, this line wont share with other code.


most lines begin with a “main variable” that is used sort of like a named pipe between commands:

x = "hello" | ucase | right 2 | print # each command sets or references x


the next line can reference that variable:

y = x | plus " there" | print | swap y x

thats how i explain fig to bash coders. i dont introduce inexperienced coders to “named pipes”; but if you can code in fig, then bash (with unnamed pipes) and basic and python are all reasonable next steps.

apropos of the post i linked to from this one, heres the punctuation from the above examples:


although ive linked to another post, ive written everything contained in this one:


programming is teaching | joequery

via a note to beginner programmers: programming is teaching | joequery:

“The students who did not understand the concepts were the cases I found extremely interesting. In my quest to help these students understand fundamental concepts like arrays and functions, I began to observe the striking similarities between teaching programming and programming itself.”

i would love to quote the entire article, though linking to it will have to suffice.

while i doubt that every language should be written to cater to every possible user, i do think that more languages should be written so we can compare and learn from their ideas.

one of the more interesting ideas i like to explore is “how can programming be made accessible to everyone?” to me, the answer is not just to change the act of programming; it is also to change the act of educating.

for those who read the article or are curious: arrays are groups of pieces of data which go together, and functions are groups of program instructions that go together; very similarly to how a paragraph is a group of sentences which go together.

you could write a book full of sentences without separating them into paragraphs, and you could write all your programs without grouping data into arrays or grouping instructions into functions, but sooner or later it would be more trouble to do it that way than to add a couple of helpful concepts.

once added, we need some way to understand and explain those concepts; even if we are self-teaching.

i have a theory about teaching programming, and it goes like this: if you really want to understand computers, dont just learn to use software; learn to write software– even if what you write is ridiculously simple. then if you really want to understand programming, dont just learn to use a language: learn to write a language– even if its a ridiculously simple one.