MOAR Three.JS

I am going to be writing a lot of articles about code in the coming months, and I’m doing some of one project in Three.JS.

Three.JS is (in my opinion) the first good raw JavaScript 3D rendering library and I find it to be the bomb dot com. It leverages WebGL stuff that’s been around a long time but hasn’t been super duper well kept up with or used in most mainstream web applications to my knowledge, which I find to be an absolute travesty.

Well, you might be interested to know that means I’ll be trying to include some interactive 3D rendering in my articles like this. If it ever stops working I ask that you let me know, but I think it’s going to stick around and be epic.

With thanks to ThreeJSFundamentals.org for this one, I figured I’d demonstrate this as a quick proof of concept for how far you can go with articles. Who needs to stick to flat test or even mere pictures when you can embed an entire videogame in your article if you wanted to?
Let’s GOOOOOOOOOOOOOO (note to self: get DOOM as an embed)

We’re living in a new age where crazy things are becoming possible, and I really want to open people’s minds to the possibilities, and I think this is one way to do it.

This has been a rough year for people’s optimism and I think we all need to be reminded every now and then that we are living in the greatest time in humanity’s history SO FAR. We’re just going crazy stuck at home or bored, or having issues with an unstable job market and tough finances. We’re seeing negative things people of ages past couldn’t see, which wouldn’t have to affect us but that we let make us anxious and depressed. We need to be looking for the good in the world around us because there’s plenty of that present too.

Stuff is cool and technology is awesome if you learn how to leverage it. Who knows, maybe I’ll write articles with the sole purpose to give you mini-games to play with when you’re bored. I’ll have to take a few weeks and make a template first so I can spin them up quickly, but if I can manage such a project, you and I are gonna have a lot of fun together, dear reader. Who knows, maybe I’ll start a trend and be the first blog of many like this?

I think we have a great opportunity ahead of us in coming years where we’ll be able to have another generation of the internet much like the flash-games era of so many years ago. At least some of us like myself miss those days. Those were good times. New technologies are being designed all the time and improvements to make it easier for people to develop.

Again, let me know if you can’t see it rendering. It should be rendering on mobile too. It’s well supported by all the browsers now. If you’re interested in learning more, you can go play with the threejs.org toys. Go have fun! there’s a bunch of them. You can play a french pinball or just go on this acid trip, headphones on.

Into the Bloggerverse

Want to start your own site? I’ve been wanting to put this site together for a while and I just never really got around to it until now, but it’s overdue and definitely time. Here I’ll mention some of the adventures so far.

I expect to focus primarily on my technical adventures in computer wonderland, and this blog is one of them so LET’S GET META.
I’ve only dabbled in WordPress a little bit and I’ve never set up my own instance so the setup is going slower than I like. What’s nice is they use the same exact interface components as wordpress.org/themes on the backend so I’m able to have friends help me dig through the layouts until I find one I like. I want to keep it minimal and user friendly, I don’t want to hit you in the face with massively useless pictures nor walls of text. I want to be helpful.

We’re on Day 4 and so far we have the server up, secured, stylized, and now I’m beginning to add other content pages. I’m going to try and write something every day. Here’s a few technical considerations I’ve encountered:

I owned the domain name I bought from Register.com for a few years, and the one thing that took a few days was realizing to have it work and the HTTPS lock, I needed to update my IP properly on register.com’s site and then change the name servers on that awful site to point to the DigitalOcean ones, in addition to using the letsencrypt.org tools on the command line.

I love DigitalOcean. You can run a website for $5-$10 a month, the cost of a music or TV subscription. Not getting paid to say this but I definitely recommend them, they’ve been reliable for me for years, and they have automatic preset installs like WordPress. I just had to say go and in under a minute I had a new Linux server to log into and fiddle with, that mostly worked as WordPress already. Be sure to update from the WordPress user interface, but if you focus on that side you should be able to get most of the setup happy using WordPress plugins and not worrying about the Linux side too much.

I’ll pick a lesser-known plugin to tell you about since I’m here: take a look at WP Night Mode. I made my site have a Night Mode toggle and set it on by default. Those who know, know. And to the rest who want it light: what’s wrong with you? and also you’re welcome. It takes a little setup of the colors you want it to use and you’ll want to use the shortcode wherever but I can’t recommend it more.

Some “fiddly” items of business you’ll want to deal with:
1) Go into customizing/themes and get to site identity and make sure you have an icon other than the WordPress one. Try to brand yourself a little bit.
2) Get stock images at Pexels, Unsplash, or Pixabay. I recommend searching them all when you’re looking for something specific. I’m traditionally a Pexels user but Unsplash is really coming through this week.
3) Find a plugin (I settled for the Yoast SEO one) that will put the featured image for your article in a link preview on social media. Test that and make sure it works, you want to come off professional and not a data-less link.
4) Find your menu and your sidebar for widgets and get those looking half decent. Get rid of any theme clutter you don’t explicitly want and organize the site so people can get around it easy. Remove any redundancy.
5) I’ll restate what I said above, get that HTTPS and lock icon ASAP so you don’t seem sketchy. You can grade your server at SSL Labs. Use other browsers and incognito to test because caching will make it act up even if it’s fixed. I took SSL Lab’s advice and disabled TLS 1.0/1.1 on my server.
6) Sort out Settings->Permalinks immediately. Once you decide how URLs are done it’s somewhat permanent or you break all your links on the web. I had to install Redirection to fix the ones already out there in the wild.
7) Under users you will find your avatar. Apparently you set it by making an account on Gravatar and it will show up soon once you have that set up.
8) Figure out how you are going to do categories and tags quickly. Don’t be using that stupid “Uncategorized” one. Categories are genres, and you should only have 2 or 3. You might even only have one. All else is a matter of tags. It takes time to figure out what they should be, but once you have a dozen or so posts, you should have more than enough info on what they should be.

Faith of a Scientist

I guess I always believed in God. There were times when I questioned as any healthy teenager should. But God is there for me, I made sure. Part of me thinks more people would believe in God if more believers acted the part. I feel like nowadays people who profess or push belief are so hollow in acting it out, it’s no wonder that so many reject or criticize it. There’s so much evil in the world to make one doubt, if nobody has good answers or shows the pathway forward.

I want to talk about why good religion and science work together.
I might have a unique relationship with God, and religion as a whole. I’m a STEM guy through and through. I live and breathe the logical, the rational, the empirical. I’m sure atheistic peers might view such a claim with their usual cynical skepticism. I don’t blame them, though they do so erroneously. I’m in a profession where I have a degree with Science in the name twice. But I deviate from the typical religious person too even among my own, having no time for superstitious nonsense.

I don’t want to talk about me or religion here, I want to talk about why I think my foundation of faith may help anyone with life who tried it as a frame, but I need to contextualize it, so if you’re really turned off by organized religion, skip the next paragraph.

I will be deliberately evasive lest you think I’m here to preach, but suffice it to say I belong to a heavily maligned Christian sect. We profess to be the modern iteration of New Testament believers, authorized by God and those original apostles. Our beliefs predate the councils of Nicaea, when Nero was blaming fires on us in Rome. People… don’t like us for that claim. I’ve been accused by other professed Christians of being a devil worshipper. I’ve been accused of being in a sexual fertility cult, throwing virgins off of rooftops, and thinking god is an alien on another planet. Of course we get called a cult, then racist, sexist, and every other word. You only need know we’re different, and believe our doctrine is finite and coherent, and that’s where I’m pulling from.

Ok? Cool.
Faith is the first principle.
Faith is a principle of action and of power.

That’s my claim. If it’s true, you can’t fully unpack it since everything else springs from it, but I’ll give the necessary bits my best shot.

What’s cool is all the definitions of the word faith as it is colloquially used in the English language are correct enough and uncorrupted enough by time to be tremendously useful in a secular discussion of it. Having faith in yourself, having faith in others, acting in good faith (even legally!), and having faith in karma, the future, and so on are fundamentally useful and pragmatically fundamental.

Without falling into rabbit-holes of human consciousness and free will, let’s say we are beings or entities that take actions and our actions are driven by our motivations. Well then, biologically we divide the nervous system into two halves, the sympathetic and parasympathetic. The former handles “fight-or-flight”, we’ll call that fear, and the latter handles anti-fear, which ranges from faith to apathy to lusts. (catchphrase being “rest-and-digest” or “feed-and-breed”). Those two systems drive all of our motivations from the most primal bowel movement to the most high-level like “success”.

Faith is the key motivation. It’s the bottom motivation from a religious end, and it’s the peak motivation from the scientific end. It’s responsible for a lot of self-fulfilling prophecy, in that people who think they can accomplish things often overcome incredible odds to succeed. And those who doubt and fear, arguably the opposite of faith, tend to fail or quit. This is why some prosperity gospel con artists are successful – because believing in something or yourself does move you forward. It’s also why some of the most brilliant minds fail. Faith only works if it’s in something that is true, and half the time, half-truths might suffice. But perfect faith can move mountains and produce miraculous consequences, natural and explainable though they may be.

I’m a big fan of the Yin-Yang ideas of eastern philosophy. In order for us to be successful organisms we need to voluntarily rotate between the halves of the nervous system, or even just creative and rational halves of the brain, in a way that’s sustainable across time from days to generations. Too much of one or the other makes you ill and dysfunctional. In order for our parasympathetic systems to keep us happy, we have to know where the predators and dangers are from the sympathetic. In order for us to remain sane, we have to slow down the sympathetic and not let little things get us outraged and angry all the time.

Pragmatically, this means the more you face your fears and the more you get out of your comfort zone, the more you’ll move forward in life. You just need to have a little more faith in others and yourself. Otherwise, you end up in a downward spiral instead of an upward one, in which you become driven by your fears and lusts, instead of being master of them. It’s up to us to choose faith and live out our heroic journey through life slaying our dragons, even if they appear as homework or bills or job hunts. Otherwise we can become tragic failures, captive in a basement or cheap apartment with roommates we hate and seemingly endless debt. You voluntarily go out into the chaos and accomplish something to bring back home to the order, or you remain where you are until you involuntarily get sucked into backward circles of alternating stressful chaos and personal tyranny.

Science and religion are completely compatible in my view. I find that any conflict between them indicates a flaw in one’s understanding of the other. As long as you humbly bake in that you’ll never know everything in either case there’s no issue. They are two parts that make a whole together. David Hume’s “Is-Ought Problem” rubs on both. You can’t derive an “ought” from an “is”, and attempts to do so lead rapidly to eugenics and/or genocide in a Machiavellian fashion. And those who try to derive what “is” from what “ought” to be are the same fundamentalists who demanded the sun orbited the earth: they’ll remain in the dark ages, devoid of the “wizards” they burnt. You need a knowledge system that lets you establish what is true and how to find out more. And you need a belief system that tells you what you should be doing with the information the former produces. We seem to be losing both.

I believe the scientific method is a perfectly reasonable place to start for determining the existence of God. If you want an answer, learn how to pray about it. Don’t recite something, talk to God as if He exists and ask for a way to determine. If you’re dead serious and honest about it, you will eventually experience the evidence. I’ve had friends who had miracles happen when they took my counsel to pray in spite of disbelief. It’s non-transferable, un-recordable empiricism each person has to test themselves, but I assure you the same data others experience can and does come.

I also believe faith is valuable in accomplishing useful scientific endeavors. It takes a lot of courage and risk to pioneer science, be it intangible travel to distant places, or fighting the battles many do in seeking funding for research. Without a little self confidence from somebody science doesn’t get done. Somebody had to take risks to test people for COVID-19.

Takeaway

I believe in a God who listens and answers but plays by the rules. I don’t believe in a fast and loose interpretation of the word omnipotent, God employs no magic and can’t violate causality or do things that can’t be done. There’s always a natural explanation and most of His doing is letting nature take its course for our education and work out details afterward. He will open our eyes to possibilities and expand our free will if we have the faith to ask and let Him.

I believe in the Big Bang, evolution and natural selection, and in the scientific method as it is used appropriately. I believe in the power of people who act in faith to pioneer, discover, and sustain our world and explore our universe. I believe you can too, if you have more faith in yourself. I also believe it takes a massive amount of faith to try and raise the next generation of scientists and engineers. I’m doing my best to succeed.

I have faith.



TO THE LIBRARY

So my twins ran around Barnes&Noble today. That was “fun”.

One of the interesting things about having 1-year-olds in a bookstore for the first time was discovering, that despite what you’d think, they did actually know what they liked and wanted. They showed us they wanted an ocean flip-up board book made clearly in the same series as a farm one they had previously (RIP). There’s a dinosaur book and there was a Sesame Street one they liked. They recognized the Dr. Seuss art style and sought more of those of their own accord.

One of the serious modern-era problems: we’re having a decline in reading.
I don’t think most people realize this. We are exposed to information on the internet constantly and too many of us are letting staring at our devices become a substitute. We listen to what people are saying online all the time but none of us ever really take the time to engage with material that’s been carefully built. The roots of this decline manifest in two (sorta three) different places.

One is failure to read. There’s a lot of people who just don’t read books anymore. Audiobooks don’t suddenly stop when something strikes you and give you time to ponder. It’s okay if you listen to podcasts and audiobooks but there’s something crucial about participating in the process of exposing yourself to other people’s stories, other people’s fiction, other people’s ideas. We are no longer being forced to use our reading and listening comprehension anymore. You can’t just catch the gist of something in the background on YouTube. Actually, reading keeps you from being locked into a certain mindset; it stops you from becoming an ideologue. If you begin to read more good books seriously, you begin to choose what it is you want to think because there’s too many opinions and ideas. You can’t be controlled by all of them, and what ends up happening is you start to have more thoughts to draw upon.
The wells of your mind will begin to run deeper and you will begin to think in new and different ways. We’re not seeing that anymore; we’re becoming stale, and culturally, we’re each becoming one of the same few things. That’s not a good development, to put it mildly.

The second problem source is the mass printing of “sludgy books”, that’s what I’m going to call them. Books are easier than ever to make. What happens is people read books that are being pushed by celebrities. If they’re writing these books at all (many are ghostwritten), they’re writing in the same way someone posts on social media – that is, they write in a way that is an outburst and not a carefully crafted expression of thought like the books of old. Often even their fiction is a projection of their personal opinions and agendas they hope to push on their audience.
Most of the books you see lining the front of bookstores are crap that nobody should waste their time reading. There’s often only 1 or 2 good books out of the couple dozen trending on Amazon or the NYT Bestseller list at any given time.
The rest are printed to make the person money or to try to manipulate other people’s worldview.

Now we live in a world where not only do people spend time on social media when they could be reading, but worse they spend what little time they have reading books that waste their minds, as if spending a dozen hours reading one person’s social media posts like a psychopath.

The third (sorta) problem exists inside the first, and I’ll call it the CliffsNotes effect. Modern institutions place such undue burdens on students, that over the past few decades students from middle school onward have collectively found a way to sum up books so they don’t have to actually take time to engage with the material. Why try to understand Shakespeare when you can just get the plot points elsewhere and pass the tests?
This crops up a lot in political activism, where people are actually quite fond of quoting books they may only know the title of, or may own but only skimmed. And they most certainly haven’t read their perceived enemies’ favorite books.
We’re not all idiots, we’re just training each other to believe it’s acceptable to cut corners because “life is busy” (A problem less than a century old!) and collectively pay invisible costs that continue to haunt us forever after.
And worse, the institutions have adapted to this and expect even more to be skimmed, crippling the ability of good students to face literature the best way.

I know how hard it is to find time to read a book. Twins running around making messes and I have plenty of hobbies consuming my time when I’m not at work. But I still recommend reading, it’s definitely something that makes a difference in the long run if you are choosing your books wisely. There are so many books we need to spend more time reading. We know the names of so many classics but haven’t read them. How many people know of Sherlock but haven’t actually read any of it? How many know about Van Helsing or Dracula but haven’t read Bram Stoker? (October’s coming up you could take the opportunity for that one.) We live in an era where it’s become easier than ever to make ourselves better and self-improve, but we are putting less time into it than ever before. These days compete for our attention more, but I still don’t think we’re doing a very good job all things considered.

What books did I get myself? Not much, I have enough I’m busy reading, but I picked up a big collection of H.P. Lovecraft that was on sale. My wife asked if she should get herself a mystery collection, when I saw it had names like G.K. Chesterton I was sold.

Takeaway

We should each be setting a goal to read at least one book a month. One book. That little could change your life over time. Most of the people who are successful are readers and do read books at that rate. Those who struggle won’t be reading this, but they need to find a speed reading or comprehension course and clear their admittedly difficult hurdles.

I can’t make you do it but you’ll certainly be better for it if you do. Better in ways you’ll want – more interesting, more hireable, more likable, maybe even more popular. Reading can be like a magic stat modifier.
If you haven’t read any of The Five Love Languages, The 7 Habits of Highly Effective People, Art of War, or How To Win Friends and Influence People, what are you doing with your life? These are all old and famous. Pick one, get on it and stop living beneath the privileges we’re all afforded, or life will leave you behind.

In the Beginning

Every blog has a first post.
If you’re reading this, you’re likely interested where I got my start so let’s go there now. I’ll be sure to stay on topic and sort/tag my other writing so you can skip to the stuff you care about.

I was born in – ha just kidding, I got my start writing code in my early teen years circa 2004 from a book about game programming my mom got me from Barnes&Noble. It taught me how to program in a system called BlitzBasic, and I later moved to its 3D rendering counterpart, Blitz3D. I don’t have a lot to show for it now but I had a lot of fun with my brothers making little toys and screensavers and so forth. One of these projects was a Super Smash Flash clone – an old web 2D Super Smash Bros. I had basic AI, and we only ever had the fake blue Mario from Super Mario Sunshine, Baby Bowser, Fox McCloud, and Lucario. Given that at the time only Melee was out, adding Lucario back then was particularly prescient.

In those teen years, I self-taught guitar, Adobe Photoshop, Blender, and I dabbled in a tiny bit of HTML and JS. I took piano and karate lessons (man, I was clumsy before that). I was a kid who always got high grades but seemingly tried to be good at everything at once. There was a trumpet and a recorder in there, I wrote my own sheet music, a few other random hobbies. (I made an underlit desk for art, with drawers out of K’nex) I wrote Pong from scratch and an AI for it on a calculator in study hall out of boredom. They were crazy years. I had a rough time in middle school and was homeschooled halfway through 6th grade, skipped 7th grade, and returned to public school as a junior and graduated at 16 in ’07.

I was always a weird “gifted” kid to my parents. Some people might find my list of hobbies extensive for a few teen years. It was just life. They had me tested as a first grader and IQ was… irrelevant, ask me somewhere else. I was a seeming rational oddball toting a TI-84 yet nobody knew I slept on the floor with the curtains open during full moons.
I’m writing this on 9/11, and I was in a weekly gifted class when the second plane hit. The teacher told us what was going on while the rest of the school was kept quiet. We read Don’t Sweat the Small Stuff For Teens in what time I spent in that class and I still credit it with having changed my life for the better at a lot of points. I’d still recommend it no matter your age.

Original cover I had

So that’s me as a kid. I went to a church university, then paused it and spent 2 years as a full missionary across the country. I decided I would go into Computer Science when I essentially came back to (for lack of a better term) civilian life (it’s that regulated and different). I did and the rest is history. I skipped the first course, which was good because I already had a year of general courses that I enjoyed but went nowhere. Married my wife, got the degree, and now I know stuff about things.

And here comes this blog, following my learning new stuff about new things and maybe helping you along the way.

Of course that’s not the whole story. I firmly believed in doing educational hobbies to supplement my education so I can make long-winded posts about each section of my college years, but now you know the man behind the handle.

Takeaway

I was mostly only ever smart because people kept telling me I was and I felt pressured to be. When I didn’t, none of my gifts mattered. You can only do whatever you think you can. So forget being a world champ or famous and go draw or build something great.
Take it from me, the second smartest guy in the room, who made friends with most of the smartest ones.

If you take away anything from this failed-polymath’s first post, take this:
You can be good at anything you decide you want to be good at.
All you need is self-discipline to make time and to try and to discard the notion that any non-competitive goal is out of reach.