About This Site

Intro

To “each his own array,” as they (I) say when one is simply unsatisfied solving a problem the easy way, curious to scratch the surface and get to the nitty gritty of things. The philosophy governing this site is simple yet significant: in order to get a complete grounding of a particular subject (in this case programming), one must first be curious and develop a desire to delve deeper and understand the inner workings of a concept. Then one must not be deterred by the seemingly copious amounts of struggle which such a task may entail, as most wonderful things can only be discovered through hard work and persistence. Finally when one does overcome such a tremendous challenge, one will feel elated, euphoric and enlightened enough to go blog about the experience. That’s what this site’s all about. It’s about sharing these experiences, the struggles involved, the challenges overcome and the enlightenment thus derived. Moreover, it’s about sharing what I’ve learned from these pursuits, and exchanging knowledge with readers like you.

Content

As far as content goes, this site will serve primarily as a blog featuring posts regarding my personal software projects ranging from Android apps to Java Swing GUI apps and solutions to various Project Euler problems. Oh, and did I mention something about copious amounts of struggle? I’ll try to make space to throw some of that into the mix as well, as what’s a good programming blog without a generous dose of ranting about why a program doesn’t work when it should and why it works when it shouldn’t, mixed in with hilarious coding quips to help maintain one’s sanity?

Why Arrays?

Sit down for a bit, and let me tell you the story of when I started taking Project Euler really seriously. It was the summer of 2014, and I had finished the 15th problem, ready to move on to the 16th, Power Digit Sum. The problem stated:

215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.

What is the sum of the digits of the number 21000?

My first instinct was to take an integer variable, assign it a value of two, then multiply it by itself 999 times, in order to calculate 21000 and worry about the sum later (possibly take the modulo 10, add it to another integer variable set to 0, divide the number by ten, and repeat until it got to 0). Now, of course, this wouldn’t work, Java wasn’t so kind; there was a max value an integer variable could have, and the largest primitive integral datatype in Java being a long, this would have been 263-1, a whopping 937 orders of magnitude short. Now the trivial approach around this problem would have been to do the same thing, except with Java’s BigInteger class, or something similar. Coming back to my philosophy, this would have completely ruined the point of Project Euler for me and left me learning nothing new, except that primitive datatypes won’t always do the job. So luckily I was convinced by some PE missionaries to create my own big integer class using arrays and implement the basic arithmetic operations from scratch, no matter how absurd it sounded. I eventually did accomplish this exceedingly laborious task and got my first taste of hardcore OOP. And now ladies and gentlemen, sit back tight and enjoy the ride.

Note: License Regarding Open Source Code

Creative Commons License

Any code found on this website that is stated as open source (eg. Project Euler Solutions) is licensed under a Creative Commons Attribution 4.0 International License. This means you are free to use such code in your own projects provided that you include an attribution link to my website in your source.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s