Yeah, I really believe in minimalism and stripping things down and keeping everything as light as possible. Every line of code, you should know what it’s doing and you should not have any extraneous code. If it’s there and you’re not using it, why is it there?

That’s actually one of the design practices, idioms of Go – you can’t have a variable if you’re not gonna use it; that’s an error, right? And I love that about Go. It’s similar for me in everything I approach, like in my house – I don’t wanna have stuff around if I’m not using it. Pass it on, donate it, let somebody else use it.

With HTML and CSS, I’m not a fan of frameworks and libraries. Yeah, they get a lot of things done for you quickly, and if you understand the fundamentals of HTML, CSS, Javascript enough to be able to go in and know what they’re doing, and tweak them and adjust them when you need to do that – fantastic, use them all day, because it’s a tool and there’s a place where you can apply it. But if you just learn bootstrap, if you just learn jQuery, and if you do that at the expense of HTML and CSS, or at the expense of Javascript, then I think you’ve really missed – I strongly, firmly believe you’ve really missed – a super important layer in your educational foundation to be competent and skilled developing applications on the web.

So if you look at metrics, and I’m really into building website now, and we’re putting together a website ourselves, which I’m very excited about, and performance is so key, it’s such a key metric… When you look at studies on performance, like Amazon lowers their by one hundred milliseconds and sales go up 1%, it’s like, “Wow, people are super sensitive.” Performance is really key, so the average size of a web page today – 2,200-2,400 kb, right? And the site we’re building right now is 400-600 kb each page. So we’re like one tenth, one-sixth the size of average sites. How do we do that? We don’t have any jQuery, we don’t have bootstrap, and when we want to put an image onto the page, we’re not using Font Awesome. Because if you download Font Awesome, that’s 100 kb. That’s one twenty-fourth of your size budget for that page if you’re trying to hit normal sizes today.
Instead, we extract SVGs, run them through Illustrator, get that SVG and then stick that code in. That costs us maybe 7 kb, or 5 kb on that page for those images.

[00:23:56.17] So just keeping things lean, and having complete control over your codebase, and a thorough understanding of your codebase – to me, that’s what it means to be a craftsperson. This is very much a craft; it’s the craft of building software. And just as somebody like a woodworker, they would know all the tools in the wood shop, and they would know the different characteristics of the different materials they work with. And when you first come into a craftsperson’s workspace – like a woodworker’s workspace – you might be like, “Holy cow, there’s a lot to know about this craft! There’s like a hundred different lays, or all these different little chisels and files, and where would you use each one and why, and which material would you choose for which situation…”, but after time you become that craftsperson and you have that intimate knowledge of all of your tools and all of your materials, and you can really start to build beautiful, well-built, performant applications.

So that’s my approach – just to do things well. When I looked at server-side languages, different languages approach things in different ways, but Go seemed to me to be the one that was the most zen – coming back to that word, zen – and the one that is the most fundamental. You’re working down at a low level and you understand everything that’s going on. You’re actually getting that request and parsing that text and you can build your own ServeMux if you want. A lot of that is abstracted away for you if you use the net/http package in the standard library. But you could grapple it, you could wrap your head around it and you could see what’s happening there.

I don’t know if that answered your question, Carlisia, but being a programmer’s language – and I don’t have the depth of experience with Ruby, I never did any Ruby, but from what I’ve heard of Ruby, it’s like there’s a lot of magic. Also, from what I saw at Python and Django, it’s like “Hey, put in a couple of lines of code, and KAPOW! in 15 minutes we have an entire cred application”, and it’s like, “Yeah, but what happened there?” How much ability do you have to customize it? Whereas if you learn web dev with Go, then you need to understand that the internet engineering task force are the people who put together the recommendations for how the internet and the web should be deployed and built, and they have these requests for comments, and there’s been a variety of requests for comments in this entire history of how the web’s been built, the 7230s up in there – those are the current ones – and then here are the specs, this is what happens… And then you could take that text that’s coming in and you could work with it, pull out the pieces, pull out the method, pull out the route, and you make decisions based upon that, do a little conditional logic… That’s what I mean about the programmer’s language.

Sometimes I say “Go suffers no fools!” Kind of like the Pirate Ride at Disneyland… [laughter] Deeeeead meeen teeell nooo taaaales! Goooo suuuuffers nooo fooools! Because I’ll hit these walls where I’m like, “I have no idea what is happening there”, and Go has humbled me so many times. It brought me to my knees with hours spent contemplating the simplest things. In retrospect, I look at them and I’m like “Okay, I get that now, I understand it. It’s simple now”, but at the time I’m like “What the heck is happening there with StripPrefix? How do I get StripPrefix to work and serve my files?” Hours spent on that…

So it doesn’t suffer fools. I mean, it’s got [unintelligible 00:27:42.12] it’s got a slice to bite. I mean, it gets down to all of your data structures and everything, and … I just gotta ramble a little bit more about Go – this is one of the things I love about Go: innovation. Technology is about innovation, and for me – that’s my perspective, but that’s the heart and cornerstone of what programming technology is about.

[00:28:10.05] A lot of people, as I’ve met people learning the language, they’re like “How come it doesn’t have generics? This isn’t OOP… Where is the inheritance?” [laughs] I’m like, “You’re a programmer! You create things that innovate. You need to innovate, too”, and I feel like that’s what they did with Go.

They looked at, “Hey, this is how programming’s evolved – spaghetti code, procedural, structed OOP”… They looked at research, like Tony Hoare’s CSP, and then they said, “Let’s integrate all that and do this new thing.” When I first started to learn Go, people were like “Go’s all about types. It’s all about types.” I’m like, “I don’t understand that yet.” But now I’m like, “Oh, it’s totally all about types!” You create your own types. I can create my own type “hotdog” if I want, and the underlying type can be an int, and then I gotta attach a method to that. And interfaces…

I feel like Go innovated and took programming and tried to bring it to the next level. Whatever name you might put on that, but from spaghetti to procedural structured OOP to the next evolution of coding. So it’s a programmer’s language and it suffers no fools, because you gotta know what’s going on, and to really use it you have to understand a lot of the most important concepts of programming.

Source link


Please enter your comment!
Please enter your name here