How to Create Your Own Programming Language from Scratch!

So I’ve been recently expanding my skills as a programmer and one of the things I’m most excited about learning is how to create a programming language from scratch! Doesn’t it sound crazy and extremely hard? Maybe even impossible? I thought so too until my friend showed me the right resources to learn from (which I will tell you about later too), and while I won’t say it’s been a cinch, it has been a lot of fun and personally satisfying!

Why Do It?

You may be asking, why would I be interesting in doing something like this? I suppose it’s for the challenge of the thing. I take on lots of do it yourself projects around my house that I could simply hire out. I like knowing that I was able to overcome an obstacle with my own wits, and it reminds me that I can forge my own path in life.

It also keeps my mind sharp. Studies show that people who learn new skills and solve new puzzles on a regular basis have less of a risk for Alzheimer’s in their old age. Since I plan to live to be 120 (no, really, I do!) I need to keep my mind in shape, and creating my own programming language helped keep my brain healthy.

I also am able to do more as a computer programmer with my own language. It’s a marketable skill that I can now offer, and it directly affects my wallet and monetary bottom line. With the new language I’ve written, I’m also able to do certain programming tasks more easily because I customized it to the type of work I do.

Just know – you’ve got some years of work in front of you if you choose to do this. It’s fairly thankless work, and if you are planning to market and sell it and make a name for yourself in the future, you’ve got to keep the end consumers in mind as you go. Having the ability to test out your language on others is invaluable, so you may consider having a team to help you get this done.

So, hopefully I’ve convinced you by now that writing a programming language is a good idea! Now…how is it done?

Steps to Create a Programming Language

The first thing you’ll need is a good working knowledge of a source language. Good ones to start with include C++, C#, Java, or Python. You will write the definitions for your new language in one of these high level languages. This is known as a compiler, and essentially what you will do is write awkward definitions for what you want to do, then craft a brand new format for those functions that makes sense and is more readable based on the work you want to do.

For instance, if you have to quickly calculate a series of complex calculations with many inputs over and over again throughout your work day, what you would consider doing is writing out the calculations in C++, then defining a new way to execute that function where the inputs are simpler to use. Doing things this way, you are more efficient in your work because the language is custom written to do your calculation.

Really this is all just the beginning – what you ought to do is check out the awesome book How to Create Your Own Freaking Awesome Programming Language. I was struggling to get my language implemented correctly for a long time until I ran across this book in a Google search.

For a minimal fee I really, finally got my language kickstarted. Initially set out in this post to hash through many of the details of creating a language but then I figured – hey – I’ll just lead them to the same place that I learned from. Don’t believe me? Check out these reviews from established authorities:

“[It] covers the broad concepts well with a focus on quick results…” – Peter Cooper,

“I’m just going to say, I totally recommend this ebook, I enjoyed it, and it probably even made me a little better as a programmer. Definitely recommend you buy it.” – Giles Bowkett

Ready to take the plunge? Check it out here!


You Become like Those You Love

I’m not here to preach in after-school-special fashion that your friends could be bad influences because they might expose you to drinking, vandalism or even drugs (oh no!).

This blog is for adults and if you haven’t learned to NOT hang out with morons then you are yourself a moron so feel free to skip this blog post. For those of you who aren’t morons (or don’t consider yourself to be one), keep reading.

Friendship is an important part of life. Yet, I believe, friendship is often times misused. A good friend can motivate you to succeed and even join you in your struggles (to help you out). However, it is my opinion, that most of our “friends” aren’t good friends. They are just normal friends (or even bad friends).

What’s Normal…and Worse Yet, What’s Bad?

I consider a normal friend someone that is just there. They show up at all the gatherings, they sometimes say a few good one-liners and they’re usually always up for a “good time”. But, you don’t really know them and they don’t really know you. They provide absolutely nothing to your existence other than a physical body occupying a chair making your duo a triple or your quartet and quintet (meaning they are just a +1).

A bad friend is similar to a normal friend but they feel a need to project their fears and anxieties on you. They are the ones that’ll be the first to make the smart-ass comment about how your next great idea isn’t going to work. Or they’re the ones that’ll sooner make a joke about whatever you have to say rather than take you seriously. I believe their lives suck so much (in their minds) that they only find pleasure trying to convince everyone else their lives suck too.

Both a normal friend and a bad friend are pointless or destructive wastes of time. And if you’re honest with yourself you know who these people are. If you close your eyes you can probably picture at least a few of both types of friends immediately.

So What’s the Problem?

The problem is that these people, whether you agree with me or not, ARE wasting your time. And more importantly, they are indirectly (or sometimes directly) guiding you away from your goals. If every weekend you surround yourself with one or two good friends and then a bunch of normal or bad ones, who do you think will dominate the mood. Obviously the majority.

Now think about this, if every time you have free time you surround yourself with a majority (or equal-jority) of normal/bad friends then you are using up all of your free-time (and possibly most productive time) in a non-productive, slightly negative and basically pointless environment. If you have any real goals in life how do you expect to ever achieve them using your time like this?

And if you don’t think their influence is that great, you’re sadly mistaken. Just by having those idiots around you’ll first cater your language so as not to set off some smart ass remark from the bad-friends. Then you’ll cater the conversation to whatever the group (mostly normal friends) are talking about. Then to tolerate the stupidity of it all, you’ll probably drink yourself drunk so as not to kill yourself with boredom (that’s at least what I’d do…but I don’t drink, AND I don’t hang out with idiots in the first place). Another potentially productive evening destroyed with lameness because of the “friends” you chose to hang out with.

How Do You Solve a Problem Like….a Friend?

It’s simple, STOP HANGING OUT WITH THEM!!! Why go to parties and clubs and etc…to be around these troglodytes that, in all honesty, you couldn’t care less about. In fact, you probably think most of them are idiots. Well, NEWS FLASH if you constantly, and by choice, hang out with “idiots”…guess what? You’re one of them!

Whether you like it or not you will imitate the people around you. So unless you are surrounded by people you respect, admire, perhaps want to mimic and even love…you are hanging out with TOO MANY PEOPLE. Limit your “friend” list to only good friends (this doesn’t have to apply to your Facebook list, but it might help).

I don’t hang out with anyone I don’t actually respect as a person and geniunely care about and enjoy. And so what that basically means is that I don’t really hang out with anyone. I have about two or three people I consider to be good friends that I do on occasion hang out with (one of them is Morgan and I see her everyday because of our business). Other than that, I have a few more people that I consider candidates for “good” friendness but I’ve never really hung out with them so they aren’t officially ranked. BUT, if I deem anyone to be “normal” or just plain “bad” I drop them like a bad habit.

Remember, you are your most precious asset (seriously, can you think of anything in this world that is more valuable than you?). And the MOST IMPORTANT thing you can give someone is your time. We are all on the clock to death and every second we use is a second we can NEVER get back. So why give away so much of your time to people who you don’t actually care about?

Treat friendship as you would treat dating. I’m assuming you wouldn’t date any yahoo who showed interest or just showed up, would you? So why be “friends” with every monkey you meet or is at the same party. If you don’t respect them, if you don’t want to be like them, then don’t hang out with them AT ALL. Surround yourself with only people that you love and care about (and love and care about you) and you’ll see, while your social life may be a bit smaller, the relationships will be that much stronger. And in the end, it’s those relationships that will help you lead a life you truly love…normal/bad friends will only get in your way.

Multi-tasking is a Myth!

In today’s world it’s pretty common to hear about all the “multi-tasking” we supposedly do in our daily lives.

First and foremost we have to check our email, then our Facebook, then maybe twitter or our favorite RSS feed or some other source of random (and largely pointless) news. On top of all this, we also have to do our work (or homework) and pay attention to our bosses and friends and a host of other things, humans, toys, etc vying for our attention. With all these things going on at once it seems obvious that many of us have perfected the art of Multi-Tasking, right? WRONG! It’s humanly impossible…

“Multi-Task” the Buzzword

The term “Multi-Task” probably was created in some obscure way that isn’t relevant to how it’s being used today. In today’s world, the term multi-task was largely brought into the popular lexicon by Microsoft and Apple (mostly Microsoft I believe with Windows 95) preaching how powerful their operating systems were. They claimed that their software could successfully do two things at once, multiple tasks, hence “multi-task”. However, they lied…the early operating systems of the day could multi-task about as well as humans do today.

What is Real Multi-Tasking

Okay, so if the older operating systems didn’t do it (even though they basically created the “mult-tasking” buzz) and we don’t do it, then what is it? Well, it’s actually pretty simple. Multi-tasking is the ability to do more than one task IN PARALLEL. The key is the parallelitude (I just made that one up).

What the human brain does (and does very well) is cycle through multiple points of interest one-at-a-time. So let’s say that you are reading an article, checking your email, updating your Facebook and listening to your friend talk on the phone all at the “same” time. What’s really happening is your brain is taking all four tasks and switching your focus from one to another and then to another. It switches your attention so quickly that it seems that you’re doing everything at once…but you aren’t.

The human mind (along with the first operating systems like Windows 95 and later versions too) can only focus on ONE thing at a time. No matter how gifted you believe you are at “multi-tasking”, all you’re really doing is putting a little attention on a lot of things over-and-over. In one minute you could spend 10 seconds on one task, 20 seconds on another, 5 seconds to see what your friend is still jabbering about, 20 seconds on the “emergency” email that just popped up and finally 5 more seconds on what might be a good restaurant to go to for lunch.

What’s Wrong with Fake Multi-Tasking?

Nothing’s wrong with our human version of multi-tasking as long as you understand what is actually happening. Since you CANNOT focus on more than one thing at time (humanly impossible so don’t argue this point, just accept it) you might want to re-consider how much “multi-tasking” you do…or at least when you do it.

If you juggle a bunch of tasks over one hour, then you’re not giving any one of those tasks a full hours worth of work or effort. The most any single task would get is probably around 20 minutes. Think about that. If you work on something for an hour while juggling all these other thoughts in your head, you’ve really only done about 20 minutes of work.

Imagine you were working on something that would genuinely take you 60 minutes to complete. With your “multi-tasking” turned on it might take you 3 hours…OR (more realistically) the quality would suffer as your try and get it done with only 30 to 40 minutes of work.

The moral of this story is simple. Until God invents Humans 2.0, we can’t multi-task so stop claiming that you do (you know who you are, people so proud to discuss their multi-tasking ways when all they’re really saying is they half-ass a lot of things at once…yippie). You can only cycle your attention across multiple items at the expense of time and possibly effort put into the task (which could reduce quality).

So, if you really don’t care about what you’re doing (regular job stuff you couldn’t care less about) then “multi-task” away. HOWEVER, if you really want to do a great job, the best and ONLY way to give it your best is to FOCUS!!! Do one thing at a time and put all your effort into it, that’s when brilliance comes out and that’s the type of effort you’ll need if you ever want to become MORE than what you already are.

Mistakes from the Financially Unimaginative

This past weekend I was listening to NPR (National Public Radio), my favorite source for news and general knowledge on the radio, and I happened upon their finance talk show called Marketplace.

It’s a good show and usually has some good, if not interesting, tips and trends to enlighten me with. Well, in this episode the Marketplace gurus decided to take on outside callers in a segment they called Getting personal: Where to park extra money.

Normally, as soon as outside callers are involved in any radio show I change station or just turn the radio off. I don’t really care what opinions the general mass has on relevant topics, mostly they either agree with the host (which is pointless) or they spit out some view that is about as relevant as the humidity of a monkey’s ass is to a lion stocking its prey. BUT, for this show I decided to continue listening to see what the callers might say…hoping that they wouldn’t drive me nuts immediately…I was wrong.

Along Came Sue

The first caller (let’s call her Sue) was a single Mom who apparently was about to be given a large inheritance from her Mother. Sue explained that her Mom and Dad divorced when she was young and that her Dad helped her out through college (she eventually earned a Masters in Fine Arts) while her Mom didn’t have the financial means to help out at all. But, now that her Mom received the inheritance she wants to give Sue a large chunk of it to help her out.

Well, right now Sue is a “writer” which she jokingly clarified meant that she works at a bookstore. She didn’t say what position she holds, but I’m assuming it’s a standard position that any high school kid (or at least high school graduate) could get with enough time working at the store (meaning it’s not financially justifying her degree).

However, she did mention that she was going to be published next year (2011). She didn’t seem too thrilled by that idea so I’m not sure if it is a self-publishing deal or something really small BUT either way I’m impressed. To take the time to write an entire book worthy of any type of publishing (and I’m going to give her the benefit of the doubt that with her Masters in Fine Art she can at least write) is a challenge and should be respected when accomplished.

The Pickle…

The reason Sue called in is because she didn’t know what to do with the inheritance money she was going to receive. Her Masters of Fine Arts degree left her with a $38,000 debt in the form of federal loans (I believe it was $38,000…maybe it was $37K or $39K…either way it was basically $40K). And the interest rate she had on the loan was six point something…which according to the radio hosts was a bit above normal.

As I mentioned above, she’s a single Mom. Her son is two years old and they live together in a small one bedroom apartment. She obviously doesn’t make much money from her bookstore job and she admittedly stated that she lives month-to-month and paycheck-to-paycheck.

NOW, she said her pickle was that she wasn’t sure what was the best avenue to use her inherited money. She asked if she should (1) pay of her student loan completely, (2) pay off a portion of her loan and put the rest into savings or (3) pay off a portion of her loan and put the rest in a down payment on a house for her and her son…


My dear Reader, do you know which choice our Sue wanted to go with? Can you guess which one she preferred and hoped the Marketplace hosts would advise her to go with?

Of course it’s choice number 3!!! Because everyone needs a home, and little Billy (that’s the generic name I’m giving her son) needs a house to grow up in because an apartment is no place for a growing boy. If you can’t sense the sarcasm I’m shooting out of this page…I need to learn to write better because if this were a video blog you’d CLEARLY SEE how sarcastic I was just being…

This woman who can BARELY afford what she has now and who lives, by her own accord, month-to-month thinks it’s a good idea (no, the BEST idea) to pay off a chunk of her loan and then buy and house…seriously! And the worse part is that when the radio hosts asked her why she felt that was the best decision. She admitted that the idea of owning her own home is more secure then renting…WHAT?!!

According to her first option above, her inheritance is large enough to pay off her ENTIRE student loan. So let’s just make the guess that she’s getting AT LEAST $40,000…cash, cleared….ALL HERS TO DO WITH WHAT SHE WANTS!!! Now, she lives in a one bedroom apartment making butt-little money per month to support her and her son. Well, unless she didn’t disclose her full financials (which I’m sure she did) she currently CAN AFFORD to pay for her and her sons living WHILST still paying off her student loan. Meaning, that if she didn’t get the inheritance she’d still be technically fine…broke, but fine.

So here’s Sue. She’s a single Mother living paycheck-to-paycheck but is financially stable and might even have the potential to make millions should her authorship take off. She has a debt of around $40K BUT she has a flat monthly fee (that if she played her cards right WON’T increase for the life the repayment…that’s how mine is, it’s not hard to do) that she CAN AFFORD right NOW! And now, precious Sue has been given 40 thousand dollars in CASH (after taxes, because if she said she could pay off the loan, she must have that much after paying back big brother).

Now, assuming she’s working a regular job she’s probably making around $30K a year (probably less actually) but after taxes she’s clearing probably $25K (probably less) per year. So, she’s living the current life she has with her son, in their home (it may not be a house but it is their home), paying off all her bills for a mere $25K per year. BUT, she now has $40K in cash in her bank. What does that mean?

It means that she has a little over ONE YEAR AND A HALF (40 / 25 = 1.6) of on-hand cash reserves should anything happen (like she loses her job). Do you guys understand what I just said? Sue was just given an entire year and more of living expenses paid in case ANY emergency happens…that sounds like security to me.

Yet, somehow she thought it wise to throw away all the money to pay off some of her debt (even though she can afford the static monthly payments) and then buy a house where she’d then have to live month-to-month once again.

Her excuse?! Because she’s a home-body and wants her son to have a backyard to play in and blah, blah, blah. My rebuttal to that is (1) your son is two years old, he’s happy playing in a box…he couldn’t care where he lived as long as it was with you so get over that excuse. And (2) if you were so obsessed with owning a home and having all these material things then why get a degree in “Fine Arts” and be a writer? Why not go for a quick and easy money field (engineering or something) so you could get your big house right way? Why? Because you chose to follow your passion and pursue your love of writing, well bravo, I agree that is the best choice you could have made BUT don’t give up yourself just yet.

You don’t make enough money to buy a home so don’t even think about it. Make sure your book is a best seller and then get the house of your dreams. But right now, take the money and use it as an ultimate security blanket and save it. Let it be there for you when you need to take the jump to success and you need financing to back you up.

And guess what, the Marketplace people agreed with me. They recommended she follow her number 2 action. Which was to pay off some of the debt and then save the rest. Since she has a nice year and a half worth of living in cash, I’d say pay off the half to the loan and just keep a years worth of living in the bank. So, $15K to your loan and $25K to your bank.

Readers, if you don’t understand why my head exploded when listening to the show. Or if you don’t know why number 3 was such a BAD decision…please do some reading and studying. There is far more to life than owning a home or paying off pointless debt. Use your money to support you and your life long goals, don’t use it to create some false sense of success (buying what you can’t afford) or horde it for a rainy day that will never come (you really shouldn’t save more than an entire years worth of living unless you’re old and are going to die soon…if you’re young, use the extra money above that to make more money).