Do something

“Where do I Start?” – too many questions, not enough action. Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Glass Ceilings

Image
A few years ago, My former employer once said to me: “I reached my peak in computer knowledge after around 10 years”. And indeed he was quite an incredible programmer. It got me thinking though, Is that peak a reality or just a perceived roof over our heads.

I’d like to be idealistic about the future and think that I’ll never hit that glass ceiling (laugh at my poor attempt at art), because well, can I know everything? Most likely no. But will I one day know enough to know exactly where to look for the gaps in my knowledge? hmmm.. that’s a separate question with a philosophy of it’s own. Technically speaking, We cannot know every detail, But we are talking about something created by humans, And humans also don’t know everything, So what we seek to know the answers to is also a confined realm.

Computers are complex machines, I don’t expect anyone to disagree, But they are far from incomprehension. If you break anything down you’ll see everything is made of simple components, those components which can be understood at a high enough level so as to be practical to use: “this does that when you touch this there” and so on so forth, ad nauseam. Break a computer down and you get the same thing. CPUs, memory, this goes there and does that when you do this. Programs are more of the same. Simple problems and simple solutions making complex creations all of which serve exponentially numerous purposes. and they all follow patterns.

With out order we find it hard to get around anywhere. Think about the rules that govern our roads, If there weren’t established conventions of driving to one side or following sign rules, then there’d be chaos. but when was the last time you had to think about what a road looks like? or which colour traffic signal means stop or go? It is something that is embedded in our brains and our muscle memory. Red things induce chemical reactions in our brains whilst driving that provokes physical response.

I.e. when red flashes in front we slam the brakes. This does not only happen at the red traffic lights we frequently visit, but any subsequent traffic signal that ‘looks light a red light’ as well. That is why some communities employ this effect to their advantage by having orange street lights which invokes caution in drivers naturally (personally i think this could have the adverse effects of ignoring actual orange signals).

So should this be different for computers. Computers – chief amongst man-made things – follow distinct patterns. Programs built for computers require efficient and well known patterns to operate. Is it possible to have sufficient knowledge of these patterns such that nothing becomes ‘new’ anymore? So that the recognition of such patterns becomes ingrained in our thinking and automate our understanding? Maybe, But if that were the reality, I’d wonder if I myself were fooled by my perceived ceilings. I do not believe for a split second that we’ve peaked our knowledge in any field. There are just too many combinations of simple things in a mere mathematical sense to believe such a knowledge exists. This world is too wonderfully made not to contain a great number of unknown discoveries.

Having reached a plateau in my pilgrimage, I’ve discovered increased ease when learning new frameworks, languages and paradigms. And for some areas, I’ve reached a dead end with Google search-ability. Such, I believe, is the realm of a pioneer. people who have reached the end of the known world and decided not to turn around. Familiarity is comfortable, safe and well traveled. But where we stand was not once a civilized place, It took the efforts of countless men to stand on the shoulders of giants (or as I like to think: ‘the ladder of men’).

What would happen if everyone on the edge of discovery pushed through the adversity and broke into new territory. What if the resolve of our generation was to innovate beyond known laws and boundaries. It is in assuming that there are limits that we limit ourselves. I never want to hint to those below me that there is a place where we can say “I have arrived”, for I don’t think we’ll ever find that in this existence. nor do i think we were meant to. Excuse my ‘archaic’ belief in a created world, but my passion would not be driven if not for a belief that my purpose extends greater than this life and into something only God could have ordained for me.

But regardless of religious belief, the what-have-you-tried philosophy of problem solving can help any man (by man i mean women too :P) and when what you’ve tried subtly extends past what is known, you too may begin to feel the incredible feeling that comes with smashing through glass ceilings…

Happy coding people.

Posted in Uncategorized | Tagged , , | Leave a comment

The Full Stack Developer: A Modern Open Source Stack

Image

We’ve entered a golden age of software development. the coder’s world is crowded with expressive languages, robust frameworks and job titles that leaves many starting-out programer-pilgrims deep in supermarket selection syndrome. What should you do? Continue reading

Posted in Programming, Thoughts | Tagged , , , , , | Leave a comment

syntax and regexp and bears, oh my!

Image

I don’t know how many times I’ve crossed regular expressions thinking: “gee willikers, I oughta learn something about those sometime soon yessireebob good sir yuppy duppy diddilumdeedee… meh…”. It’s not that i think they aren’t useful, I’ve always wanted some magical means of matching patterns to serve my agenda. Its just that Its yet another language, and i doubt how much more syntax i can squeeze into my head before I explode.

Currently as it stands, these are the language sets i know:

  • Java
  • Javascript
  • Groovy (extended java)
  • SQL (DB2, MYSQL)
  • HTML
  • CSS
  • XML
  • JSON
  • HTTP/1.1
  • Shell / Bash
  • C (little bit)
  • C++ (little bit)
  • Objective C (little bit)

And I’m not counting here all the micro languages and DSL’s (Domain specific languages) that I have picked up from experience. Am i trying to boast here? not really, I’m just pointing out that after a while things are getting hard to keep track of. each one of these are spinning plates on top of a pole and when I’m not using one of them, I slowly forget. And i know that they can just escape from memory, because I used to know C and C++ very well, however I’ve since forgotten them from the earlier days of university.

But I’m not giving up yet, Regex.

Memory is an interesting thing. So is our brains. When we learn something, we’re creating pathways in our mind that are permanent fixtures, just not well travelled ones. I know enough about physiology to understand how memories form and how much room is really left in my head… Well it’s not a matter of how much room there is, because the brain literally makes new things when we learn.

There is such things as memories that don’t go away. Why? because the neural pathways are so strong that it is crossed over by mere default when we think upon the subject. And why do some memories stay? because the learning is attached to strong emotions and more importantly, revelation. When we understand something or feel like we’ve stumbled or conquered some learning hill, we remember those victories, and we remember what brought us there. That’s why many people feel like they learn much more in the field than in the books. It’s because the victories we experience there come with real consequences and reward. This reward attaches itself to the things we battled on the way and those memories stay with us.

I have to admit, The spinning plate allegory doesn’t quite fit this picture, As everytime you spin the plate, you increase the time it stays spinning, and with constant care, the plate stays in motion with little to no effort at all.

So Regex, Maybe I just need to climb that hill and use your magic to commit you to memory.

Posted in Programming, Thoughts | Tagged , , , | Leave a comment

The Golden Ratio Learning Strategy

Image

Recently I’ve stumbled across a pretty cool game. The name is Inflation RPG. The idea is that instead of growing levels slowly and acquiring gear over a long time like usual rpgs, You only have 30 battles (or battle points) before the game ends. Each battle can give you 100s or 1000s of levels at a time and gear that you gain during the game may be kept for the next one. So far the highest level I’ve got up to is around 55,000.

The way i play this game follows a very famliar pattern. In fact it is a pattern that has influenced the way I play any game:

Captialize, Risk, Bulldoze.

I tend towards mass accumulation and utilization of my resources until I have around a 70% perceived victory chance. I find that this percentage is the golden ratio – in fact the golden ratio stands around 1.61 which when flipped gives approximately: (0.62) – Although the percentage is not quite the same, The idea behind it remains. venture out into the uncertain when you are about this certain of victory.

You will learn the most when you work to 70% certainty of success.

There was a university study of this a while back that i can’t seem to Google, but It said that this ratio is the most efficient way to improve in any field. When you are 70% confident in your abilities given a particular task, You are at your peak of learning. Too confident and you won’t learn anything, Not confident enough and you will find yourself lost for direction, but 7/10 success chance and you find yourself just enough on the edge of breakthrough that you will push through to resolve. And sometimes you won’t, but even so you will have gained enough experience to apply for next time.

Image

See this pattern? It’s the golden ratio spiral or the Fibonacci Spiral (each rectangle you see is the width of the last two widths added together). This isn’t quite the exponential growth I’m talking about – as I suggest growth happens in the ratio’s reciprocal – but we see this pattern naturally in the world around us, It’s in seashells, plants, even our body contains this ratio. I wouldn’t be surprised if this rate is inbuilt into how we learn.

Learn to take calculated risks. This will thrust you into knowledge and skill.

Happy coding!

Posted in Uncategorized | Tagged , , , | Leave a comment

Take a good hard look at yourself. Now look back. Now look to your right, now back at me. I am on a horse.

But in all seriousness, HTML and CSS has to be the hardest thing I’ve had to learn so far. I account that not only to microsoft
being so darn slow at implementing conformant browsers (A dollar for every time i’ve seen “for this to work in IE <7…”), but
mostly for the countless caveats I encounter. Add that to cascading rules that make documentation grinding a grim reality and
specificity laws that change with authorship, user-clients, position in stylesheet, selector ids, classes and pseudo-classes and
you have a surefire way of ensuring depletion of ones patience repositories.

But I’m a noob. Maybe I fail often just because I expect css to work just like java. That i would only need a small language subset
and it would all just flow nicely from the tips of my fingers. Instead i find myself writting rules not logic and scratching my
head because the element on my page turned grey instead of beige due to some hidden css selector somewhere in bootstrap’s stylesheet.

Firefox comes to the rescue here slightly, their inspector is second to none IMHO and given the options available I would
recommend mozilla in a heartbeat. What it doesn’t tell you though is where the selector is. For that i have to know what possible
style sheets i have referenced and find it myself. And thats why I don’t like CSS. It’s not that its hard, but it is tedious. and
highly error prone to all but those who know their style sheets through and through and css cascading rules in their head. I’ve never
seen a specification for rule inheritance as complex as css’s. I suppose you’d need it though. There’s all this stuff about specified values,
computed values, inherited values and so forth. Selector specificity is a monster in itself and easily off putting to those new to the
field.

If you are starting out in HTML and CSS there are a couple of things I would suggest.

    Learn from example:
        download bootstrap and set up a few base components where you can look into the style sheet and observe why elements are doing what they are doing. CSS is best learned in the field not in the book. You won’t be memorizing key attributes but you’ll experience their effect in real life and thats how you’ll learn.

    Reference a selector cheat sheet until you know it from heart:
        CSS is all about zeroing in on document elements given a certain criteria and applying properties to that element. once you understand this, It is easy to read through css sheets and anticipate an element’s computed properties. but to fully understand what an element will contain you must…

    Learn the Inheritance model:
        Google ‘css inheritance tutorial’ and you’ll find something useful eventually. Understanding this is crucial to ensuring you don’t spend hours tweaking a selector to make the element do what you will. If you use a css framework like bootstrap, There exist a multitude of selectors that will clobber your page you need to ‘beat’ in order to make your page behave the way you want.

    Don’t use ids too often:
        the power in CSS is in it’s inheritance and selectors and therefore it’s don’t-repeat-yourselfness (DRY), Using ID’s means that you are creating styles that cannot be reused. This is often counter intuitive unless you are certain the element itself is a once off (I.e. Your company logo).

    don’t sulk, just do it:
        Obligatory Nike reference here. Too often in my early html, css days I found my self staring at my blank page feeling overwhlemed at the css documentation, html creation, style syndication that lay before me. There is no shortcut to learning web design other than simply starting to design something. If you are stuck for ideas then there are a multitude of sites that give examples of goals you can make. Like i said in my first point, This field is best learnt in the pudding not out. Make short, acheivable goals. And I mean small; make this element pink, Make this box float left, small gradual goals will help you build confidence slowly. back this up with a decent source control system [i.e. use Git], and a build system like grunt and you can have a tight workflow of cause and effect, seeing changes immediately as you edit your source files.

I hope you find hope in the mess that is HTML and CSS more than I did when i started. It’s not impossible and eventually you will find your rhythm like I am finding mine. Just keep going!

Happy coding fellas!

Posted on by naredjagle | Leave a comment

No time to explain! Play!

Image

I have been met with what I can only describe as being some form of April fools paraphernalia. This weird game keeps popping up in my intellij idea EAP release and i have no idea how to stop it popping up.

 

Any ideas?! google does not yield an answer.

 

I have concluded that this is an addictive game. Here is my best score so far…

weird intellij game

Posted in Uncategorized | Tagged , | Leave a comment

Humans, Robots (bwoooow dananana deooowwww)

 

Image

One of the hardest things to grasp in computer science: Caching things is synonymous to predicting the future. How do i tell if i need to get what i just cached again? You make an educated guess. Or you let a human decide. I think we’ve all fallen into the trap of thinking computers should be ‘smart enough’ to deal with these sort of issues by now. I mean, how many times have i heard someone say we have more power in a calculator than the first computer in the space mission thingy. But the problem is just as philosophical as it is technical:

Computers will only ever be as capable as the person who programmed them.

Now i know I’ve just triggered a flame war, However as of writing this, that flame war will mostly consist of two random people who may or may not read this article, so I’m not afraid. As much as we’d like to actually believe Robin Williams could become human one day, we cannot pass the logical fact that every single line of code was written by a human being (Including dynamically generated code, i.e there must be a template of what code should be generated that is written by said homo-sapien).

Therefore, Computers are still subject to the same problems that humans are. Albeit computers can arrive at the problem faster and can store more problems than we could, but if we have trouble doing something, chances are a computer would too. That’s why caching is a hard problem, because in reality, we can’t arrive at a general solution ourselves. But we can guess, because of one significant difference between man and machine:

Humans are driven by intuition and context, Robots are driven by algorithms and limited input.

Although my fellow robotic counterpart can generate a gazillion prime numbers per minute and show me the best route from my current location to McDonald’s, It’s quite limited in what it can take in. Humans however are masters of context, Not only do humans take in the sights, sounds, tastes, touch and emotions of what is around them, but they can know the history of what is around them, they can think abstractly about their surroundings, they can make arbitrary links with whatever they please around them.

Thus when posed with the common conundrum of caching, Humans can reason about it where as computers cannot. If i get a letter with no date on it stating that war has broken out in Europe and Hitler is running amok, I could use reason through context of history, the oldness of the letter itself, and common sense to detect that maybe this information is out of date.

As soon as information is cached, It becomes out of date

we can’t predict the future, and we don’t have control of all external forces, therefore apart from the most trivial pieces of software, we are only ever guessing. That is why for the most part, get a human to make that decision. I.e. Refresh the page, fetch the link, reload whatever, because we were born to do it. Its in our nature to explore new things and process them accordingly.

AI is an exciting thought, but computers are made to do things that we know, not what we don’t know. If something new appeared before a machine, how would the machine tell whether it is relevant and useful and not just white noise? It can’t, But we can. our senses are bombarded with stimuli and for the most part we successfully filter out what is relevant and what is gobbldiegook.

Also, I love Flight of the Conchords.

Happy coding!

Posted in Programming, Thoughts | Tagged , , , | Leave a comment

The Slightly Great Commission

Yes, I Jared Nagle have been commissioned to build a website!… by my wife. Tis an honourable feat. And thus the first thing on my plate is deciding what technologies i should use to create it. I am greatly interested in Javascript libraries/framework. Cheif amongst candidates is AngularJS, BackboneJS and EmberJS. I choose you, Charmander! Yes that was a pokemon red reference (long live the 1990s) and Yes that was a quick decision. But not without some forethought.

After reading this blog amongst various other reviews it appears as though the decision boils down to what kind of application i want to develop. Do i want to be investing in a framework that will carry me through long term? do i want a framework that is small in size? Do i want something that is easy to learn? turns out I’m in this for the long haul so I’m gonna go with Ember. It’s at version 1.4 at the time of writing and i think thats enough numbers past 1.0 to be production ready. That plus the fact that my boss at work is considering all possible routes for developing what will be the new framework for their internal systems. And we have many requirements.

So Ember is the framework of Choice. It has many functions, a MVC framework that auto binds. This should reduce code significantly. I’m quite new to front-end development in general so I’m not quite sure how people arrange their folders and files. I’ve been test driving yeoman but that seems to be still in development. For Java development, I use Gradle as my build/dependency management/everything engine and i wouldn’t be surprised if it contained support for javascript library management.

Infact let me google that (for you)… *gradle javascript*… a brief search shows up with a gradle-js plugin. It lets you combine all your javascripts into one, minify them, run JSHint on them… etc,etc… I wonder if there are any javascript libraries in maven… well there are. They’re all under the “org.webjars”… but hang on, after going to www.webjars.org it looks like they are just javascript libraries bundled into jars… thats not what i want. I want something like bower… well ok, I’ll just use bower then. Bower is a front-end package manager.

Seesh. There is a steep learning curve here. Ember, Bower, Bootstrap, Sass, Mocha, Html, CSS, and all that jazz. am I in over my head? I think that my overwhelmed feeling mostly comes from my inexperience with javascript and html. But as with most other things in my knowledge base, I think as i learn and keep reading constantly, I’ll eventually become proficient. It will just take time. 

Posted in Uncategorized | Tagged , , , | 1 Comment

You lost me at CPU…

just when you thought you were safe on land.

So I have two things to get off my chest:

1. That burn mark on the bus stop clearly looks like a shark is about to own that blue strip above it from behind the timetable. I’ve been staring at said scuff mark for a year now and only now had the courage to reveal its identity. I hope I am not smelling of fresh fish tomorrow when he finds out.

2. The station I start at on my travels to work was playing moonlight sonata loudly over the speakers for all the lucky passengers to add to the depression of going to work. Fortunately I am not that lowly citizen that despises his occupation, so i deflected the attacks of the alleged scientists standing behind their one-way mirrors ticking boxes.

Now that I am free of the burden of carrying around such exciting information with me, I can start to talk about all the intricacies of computers and their… hey! you can add polls to your blogs! just a second…

Sorry, I just noticed the shiny button above me and couldn’t resist waiting another second. now, back to the shiny other thing that I’m currently typing on.

So apparently computers revolve around processes’. What is a process you ask? thank you jives, I will divulge. broadly speaking, a process is a series of actions or steps taken in order to achieve a particular end (thank you google). quite unintentionally, the phrase ‘in order’ needs a comma to clearly define exactly what a process or more specifically a program is for a computer. You have a room full of technicians and artists and librarians or whatever, and you need to tell them what to do, in order, to achieve a predefined purpose. These are all important components.

Now the similarity breaks at the human level as we humans like to be able to multi-task (although i must say I am a horrible multi tasker, but i can at least brush my teeth and see how good i look at the same time). as much as your processor says it has 32 multi duo-quad cores and 50 gigawatthurtzes, Your computer is still as dumb as the first generation of computers and can only really do one thing at a time effectively. What we have right now is pseudo parallelism that is so close to multi-tasking that it has us fooled. True multi-tasking is something only the realm of quantum physics can possibly touch, but we’ve only so far been able to figure out the factors of 15. My 2-year-old could do that. Not really, that would make her a genius.

Straight from the book:

A process is basically a program in execution. Associated with each process is its address space, a list of memory locations from 0 to some maximum, which the process can read and write. The address space contains the executable program, the program’s data, and its stack. Also associated with each process is a set of resources, commonly including registers (including the program counter and stack pointer), a list of open files, outstanding alarms, lists of related processes, and all the other information needed to run the program. A process is fundamentally a container that holds all the information needed to run a program.

That last line is pretty important. It’s basically saying that processes are a box. A box that’s got all you need to run a program. But not a program in the sense that the everyday man thinks of a program. What you see as a program is probably thousands of little programs working in unison to create a single user experience. On the lower level, processes are the building blocks that make the software that we are familiar with. Whereas a web browser or app may be the higher level “program”, the actual byte code machine instruction programs that do system calls would not be as visible to the average observer. What we see happen on the surface is only the tip of the iceberg.

These small brick building boxes, that have all you need to run a program, is EVERYTHING that comprises the system you are looking at right now. a bunch of registers containing the most recent data, some instructions, data and stack values. EVERYTHING is a process. Each program boils down to a small set of operations like the keys on a piano that when composed in varying ways create the complexities of every system ever made on a computer.

That’s the part where I claim to be a composer, not just a developer. What we create is truly extraordinary and wonderful, It makes you ponder the creation of earth itself (as I am unashamed to believe in). But i digress, what seems like a complicated process boils down to the management of these simple components. Processes. If you can understand this abstract concept in it’s fullness, the rest of the computing world unfolds as everything in computing revolves around this.

As I continue to learn more about computers and their innards, I’ll tell you more. This is not only a learning experience for you, but for me as well. So let me know if you have information regarding possible in-errancies in my posts.

Posted in Programming | Tagged , , , | Leave a comment