Golang is BAD for SMART PEOPLE

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
why is golang bad for smart programmers an honest review of why golang may be bad for experienced developers okay so when I hear this I I feel I feel in my head that this is going to be one of those you know the these articles where it's actually like the inverse where we're gonna get duped you know what I mean it's gonna be like oh yeah a smart programmer's right CL you know clever code and golang makes it so easy to write production grade code so good you know like it's gonna be one of those things right so let's find out see lots of clappies uh I hate this image I'm not gonna lie to you this image makes me so angry okay it just does all right in recent months I used go for the implementation of the proof of concept in my leisure time partly the study of go programming language itself such as hello world programs themselves are Elementary and not the purpose of this article but the experience of using go itself deserves a few words about it okay okay okay okay okay okay okay okay okay okay okay okay okay okay go promises to be mainstream language for scalable severe code classic that's the kind of production code I write severe code uh the language was created by goggle you know which is actively used to sum up I honestly think that the design of go is bad for smart programmers oh this isn't an ironic article I don't think golang designed for weak programmers hmm go is very easy to learn so simple that it took me one evening evening to introduce it and then I could write code productively okay so this is one of those articles the book on which I studied is called go an introduction an introduction to programming and go the book like the ghost Source its uh code itself is easy to read has good code examples and contains about 150 pages that you can read at a time the Simplicity is refreshing at first especially in a programming world full of overcomplicated Technologies but in the end sooner or later the thought arises is this really so Google claims that the Simplicity of go is a compelling trait and the language is designed for maximum productivity in large teams but I doubt it uh I love that doubt doubt I mean what is that can you just throw out a doubt like that there are features that uh are either lacking or overly detailed and all due to the lack of trust in the developers yeah I don't trust developers either hey uh press one in the chat if you've accidentally written a bug in the last seven days go ahead one in the chat if you've written a bug in the last step that sounds like I got a lot of trust issues going on in in the Stream today okay how am I supposed to trust any of you when you guys keep on writing problems okay I've done it today I did it today I fixed two bugs that I wrote today I fixed a bug that exposed an additional bug it was like bug fixed bug new bug fix the new bug success org wait back to status quo damn all right um this pursuit of Simplicity was a conscious decision of the developers of the language in order to fully understand what it was for we must understand the motivation of developers and what they were striving for and go so why was it made so simple here are a couple quotes from Rob Pike uh who is one of the sponsors of the go language the key Point here is that our programmers are not researchers they are as a rule very young they come to us after their studies perhaps they have studied Java C C plus plus or python they can't understand an outstanding language but at the same time we want them to create good software that that is why their language should be easy for them to understand and learn I'm not gonna lie to you I get or this person's coming from this Rob Pike fella but when you read it watch it like just just hold on just one second let me just change how I read that for uh for just a second okay let me just put on a different voice a little different costume here okay Point here is that our programmers are not researchers they are as a as a very young and they come to us after our studies perhaps they've studied like Java C C plus plus or python they can't even understand an outstanding language but at the same time we want them to create good software that is why their language should be easy for them to understand and learn I'm not gonna lie to you it does sound like a dick hole statement okay like when you when you think about what it's actually saying it seems kind of like a dick a dick thing to say but at the exact same time I totally get this idea which is let's create a piece of software that anyone can be successful in right away that's the more charitable read and you should always try to read things charitably okay which is hey how can we get anyone of any experience level up to running extremely fast that's how I'd like to pretend to read it you know what I mean uh go is for C uh go as C for dummies yeah it is it should be familiar roughly similar to C programmers working at Google start their careers early and are mostly familiar with procedural language in particular the C family the demand for Speedy productivity and new programming language means that the language doesn't have to be too radical I assume by radical he's talking about like that 90s Vibe of someone wearing one of those hats with all the different colored triangles on it and has flipped up and is carrying like a skateboard around radical radical radical um I'm not gonna lie to you so uh so I've been uh pretty much crushing out in Zig lately you guys have been seeing it we've been doing many days of Zig and by many days I'm probably up to like four or five hours uh on Zig and I'm already significantly better at Zig than I was at 20 hours into rust I'm already better at Zig than I probably was 30 hours into rust so there is something to be stated about a simple language Zig is a fairly simple language you know what I mean it's a fairly simple language there's not a lot to zig so it's very curious I'm curious how it keeps going I don't know uh what so Rob Pike in essence says that developers at Google are not so good because they have created the language for idiots so that they can do something what an arrogant look at your colleagues I have always believed that Google developers are hand-picked from the brightest and best on Earth surely they can handle something more challenging hmm I can understand how you get there right we could we could understand how you could re arrive to that conclusion reading that statement uh being simple is a worthy pursuit in any design and trying to keep things simple as hard however when trying to solve or even express complex problems sometimes a complex tool is needed complexity and confusion are not the best features of a programming language I would argue that they're bad features I would argue that they're not even a feature yeah one of our features is confusion we've been working on the confusion engine for about six months now and the confusion engine is actually pretty amazing okay it uses an advanced ligma algorithm to really reach around and surprise any programmer they felt things they haven't felt ever uh because we all know we are dealing with Arch users okay but there is a golden mean in which it's possible to create an elegant abstractions in a language that is easy to understand and use this is gonna be a rust article isn't it due to Simplicity go lacks constructs that are perceived as something natural in other languages it may seem like a good idea at first but in practice verbose code comes out the reason for this should be apparent you need to make it easy for developers to read someone else's code but in reality these simplifications only harm readability there is no shorthand and go either a lot or nothing okay for example a console utility that reads standard in or a file from command line arguments would look like this all right we're gonna do a little bit of flags get some Flags we got ourselves a little bit of a string a little scanner a little error if the flags are greater than zero we do a little open if it's not if it's not nil we're going to log out that fatal crash the program else we're gonna grab a little scanner we're gonna hit the standard in we're gonna go in here and grab the text from here if there's any errors we're going to be done we're going to log that out else print the text okay that was incredibly simple that might have been the easiest code I've ever read in my entire lifetime he said long I'm not sure what's long about that declare a couple variables check for the conditions handle error what this is literally like the only thing that could make this smaller would be that you have to have this as a handleable syntax it's a lot of white space yeah people add a lot of white space you could remove that white space right no I mean you don't need any of this white space some people like white space well this code tries to be as general as possible go as forced uh for boss that gets in the way as a result is a lot of code to solve a simple problem for example here's a solution or uh to the same problem with a not so known d-lang we're getting a wild dealing okay here we go source args is greater than one we do a file else standard in line by line join write it try catch uh that's because this is like the worst see the problem is is that this right here is actually hiding a huge amount of pain in the asses okay this hides at just a giant pain in the ass second off why is there a bang here I don't even know what the bang does okay okay I actually have to go and research what this word means whereas in this previous one you didn't have to research what any of this means right you can just you could just guess this you don't you don't even know right unless if you have someone that knows the de-lang this is not uh easier to read this is this is I would I would argue this is effectively no different in my head other than I don't like this control flow I've never liked to try catch control flow return Errors By value is the only way um but I mean yeah sure this is a little bit easier to read but I mean this is an exceptionally tour statement I'm not I'm usually not a huge fan of that also lacking of types is really bothersome to me I hate autos in general I hate Autos uh just because I've had such bad experience with it uh now granted if this has a really good LSP then I wouldn't hate anato but this feels like I could hate it right if it's anything like the C if it's anything like playing Deez Nuts it is awful all right uh oh and who is more readable now I'll give my vote d ' okay hey the man likes the D okay it's not a big deal okay some people preferred the some people don't all right it's that simple uh it's code is much more readable uh as it uh it more explicit describes the actions D uses the concepts that are much more complex alternate function calls and templates then go well see nothing really in here is saying nothing nothing up nothing that I read here is that much different other than the fact that he could use a ternary right is that what he's saying is that ternary because he uses a bunch of he like alternate function calls and templates he's using a lot of words that I I don't really understand what they mean therefore I feel stupid therefore I'm getting really upsetting I'm getting I'm getting really upset uh but I mean this is just the same ternary statement except for you handled the error in line as opposed to throwing it out in the exception right there's actually no difference between this code other than you got to realize that there could be an error here maybe an error here right you don't you just don't even know that there's there's multiple places for errors right you just don't in this statement you don't know what errors in these statements you know exactly what errors you know exactly what airs right it is it is slightly different I guess in one sense you're hidden right ternaries are for Betas could be copy hell a popular suggestion for improving go is a generalization this will at least avoid unnecessary copying of code to support all data types for example a function for summing a list of integers can be implemented in no other way except as it's copy pasta let's see of its basic function for each integer type there is no other way okay so this has been fixed with basic generics right uh this article is obviously just right before generics must have come out because this has been effectively taking care of this problem at least yeah this is now fixed and that's fine right right uh in this example let's see and this example doesn't work for science types this approach wholly violates the don't repeat yourself uh principle I don't necessarily believe in the don't repeat yourself principle I think a lot of people see code that is extremely close to each other and try to make some sort of meta function that like makes it all work together and then you end up with code that has like a lot of if statements and it ends up becoming what I consider a lot more confusing often I find that dry people that drive towards dry towards it at the cost of like abstraction and it's it becomes very difficult premature abstractions is the root of all sorts of software woes okay simple elegant and straight to the point is this a d article I haven't had the D in in a long time uh here is a function reduce for template type and predicate this again more difficult than the go option but not so tricky for smart programmers to understand which example is easier to maintain and more comfortable to read I really don't get this right Ln at the end so it's kind of interesting right seems kind of weird to have print debugging as like a first class member that if you just dot it just it just happens all right Terry I don't I don't like what you have to say Okay Terry you're over in here saying weird stuff okay check guess what hey Prime can we make out okay hey it's not how that's not how people responded here okay you don't come in here talking to me like that okay I have a beautiful wife all right a beautiful wife Theory and my beautiful wife would not appreciate such advances in this chat all right you got that are you feeling me dog Karen can we uh can we do a little PSA a little Public Public Service Announcement um a little public segma announcement that uh I will not be making out with any of these startup interns okay just a general rule of thumb as CEO CEO CEO CEO and chairman of the board of the startup I'm just not into making up making out with the with interns okay at least director level everybody knows that all right type system let's see as they read this I suppose go programmers will scream you don't do it like that with the foam in their mouths well there is another way to make a generic function in types uh but that is completely breaks the type system I agree this is harder to read I'm not sure what I'm reading here I'd have to take a little bit to understand what interface interface interface interface interface interface this is what I usually call uh an attempt to make the worst code possible to make your own argument to make your own argument uh what this is is this is a in interface which is some sort of array or something a memo for cast results is my guess a function that takes in two items probably to add them together right uh and then returns out an interface of similar amount and this total function returns out an interface it is right memo boom public reduce list zero Funk interface interface interface memo int plus right this is okay yeah so we we we got this yes a generics literally solved this but this was obviously written before generics this implementation reduced was borrowed from an article idiomatic generics and go well if it's idiomatic I wouldn't want to see what non-ideomatic example oh God usage interface is a farce and in the let's say and in the language it only needed to bypass typing it is let's see it is an empty interface and all types implemented allowing complete freedom for everybody this style of programming is ugly and that's not all for acrobatic stunts like this you'll need to uh to use runtime reflection even raw Pike doesn't like individuals who abuse it as he mentioned as a talk I actually do agree that I think interface When I See This I get pretty skeptical right I don't like that usually if you're using interface it's because you don't have the power to do generics right typically that's that's how you get rid of that you should runtime type checking is always just a really bizarre activity to me right it's it's the lack of a good enum yeah it's pretty much a lack of a good type in enum system uh generics and enums right uh it is powerful tool that must be used with care it should be avoided uh unless strictly necessary uh I would take D template instead of this nonsense how can someone say the interface is more readable and even type safe the grief of dependency management goes a built-in dependency system built on top of the popular VCS hosting is this GitHub are they trying to say on top of the popular VCS is he trying to just say GitHub without saying the word GitHub the tools provide uh provided with go are aware of these services and can download build and install code from them in one Fell Swoop but it's not even GitHub right it's actually more than one it's just git in general right wow this is great there is a major versioning oversight indeed you can get the source code from services like GitHub or bitbucket using the go tools but you cannot specify the version is that true I thought you could specify it in the mod in go mod can you not do it in mod I thought there was a versioning thing you could do yes you can nowadays what is a days like in the last year two years or ten years or when when did go ahead I forgot what go added modules it was like in 2016 or something like that I'm pretty sure you can do that uh January 1st 1970 classic it was like 2017 yeah okay okay you can do it in mod yeah like four years-ish yeah that's more than this article okay again simplicity at the expense of utility I'm not able to understand the logic of such a decision just because you don't understand the feature after asking such questions about fixing the issue the go development team created a forum thread that outlined they were going to get around this issue their recommendation was just a once copy the entire repository into your project and leave it as is what the hell are they thinking well yeah that I mean that is this real okay okay hold on let's see uh yeah okay who is let's see uh I want to just see someone saying yep that's how we're gonna do it anyways I don't want to read that I don't want to read that uh the author's wife I ran off uh with a go Dev oh 2015 yeah that's old I think I believe they fixed that right yeah I do agree that this is I mean when he says this what he's missing right here is like any historic C C plus plus potentially even Zig development is that this is kind of like how a lot of versioning happened for a long time in software right you have some sort of vendors Library and you build out your vendors and so it's not surprising that that this is how go happen to be girls just like oh we don't need any of that and that's that right get some modules yeah dude get some modules are a pain in the ass but this is kind of where they came from I think uh in my opinion go was developed by people who have used to see all their lives and by those who did not want to try something new the language can be described as C with training wheels there are no new ideas in it other than support for parallelism which by the way is excellent and this is a shame you have excellent concurrency in a barely functional limp language another creaky problem is that go is a procedural language like the silent horror of Cu end up writing code in a procedural style that feels archaic and out of date and outdated I know object oriented programming is not a silver bullet but it would be great to abstract the details into types and provide encapsulation what the [ __ ] I thought it had strucks with properties and receivers isn't that literally level one you have classes with properties and methods and you can make them public or private is that not like the fundamental basis of just like a type system structs and interfaces the problem is this man's had too much D okay this is your brain on D okay you have too much of it and this is what kind of Articles you're gonna write okay I'm just saying this is what happens uh go is designed to be simple and it excels at that goal it is written for weak programmers using the old language as a template it comes complete with simple tools for doing Simple Things it is easy to read and easy to use it is incredibly verbose lackluster and bad for smart programmers to be real I am happy and I think it makes me want to use go more okay because I don't know if you know this but have you ever had the deal with really clever typescript code have you ever had to deal with real clever react code have you ever had the deal with real clever any code that allows you to be clever it's awful it's awful and the moment you at the refactor it's not just like a little refactor it is a huge refactor right it is hard it is awful and I hate it and so it's like this I don't want smart programmers in some sense this because it was given the fact that a simple language is not good enough for a smart programmer makes me think you want clever Concepts and sometimes clever Concepts just take too long to thoughtfully you know to get through there are times where there's clever problems that need clever Solutions right I bet I you know here's a good example if you've never done request duplication on cash Keys it's really really hard to do like if you have the ability just to create like say a Shaw 256 or an md5 and throw that into a map and say hey is this request currently running well I can just you know leech off of that yeah it's easy I get it but if you have to do something more complex than that where you have two requests that are asking for a bunch of data and they may have some overlapping data it is really hard to do request deduplication it's a non-trivial problem and it requires a fairly clever algorithm it really does and so if you haven't done it I'm just saying it's fun time it's a fun time I've had to do it I did it took a long time to get it really correct and it took a lot of unit testing I know unit testing a lot of it took a lot of thought to get that stuff kind of correct and so I get you need clever code uh but this whole this this article is just not I'm not gonna lie to you I don't like it I don't like it I don't like this article okay I think goes a great language I think go is one of the best languages we've had in a long time and the reason why go is such a damn good language is that anyone can program it and be moderately to very successful and that's very very very very very important right if you can get anybody to be up and running and making your product better quickly to me that's a w right it hits a very good sweet spot which is I wish it had more but you can still do a lot uh one thing that I just love about go is the concurrency I love the channels yeah the channels there's those four on the the four hard cases of channels in which you use that one library to avoid the four hard cases of channels and boom everything is easy but besides for that it's just like why why not I'd be just fine using go on a server I have no problems would I'd rather use another language if I could write it from scratch Maybe you know I'd have to really think about who's the team coming in who am I trying to hire what am I trying to do I don't know if I had to just simply get going as fast as I could and I didn't want to use typescript I'd use go even if I die and I barely no go but I know within one week I'd be able to travel faster and go than pretty much any other language and I'm okay with that I just think typescript is a piece of [ __ ] that's all I think that's what I think okay that's what I think all right as someone as someone who programs in typescript probably more than most people and I know probably more about typescript than 85 percent of people in chat typescript is a piece of [ __ ] JavaScript sucks the name is the primogen flip can you zoom in flip can you can you zoom in flip zip Zoom flip zoom in right now okay hey hey the name is the primagen
Info
Channel: ThePrimeTime
Views: 252,511
Rating: undefined out of 5
Keywords: programming, computer, software, software engineer, software engineering, program, development, developing, developer, developers, web design, web developer, web development, programmer humor, humor, memes, software memes, engineer, engineering, Regex, regexs, regexes, netflix, vscode, vscode engineer, vscode plugins, Lenovo, customer service
Id: rWJ1tPCnVJI
Channel Id: undefined
Length: 27min 24sec (1644 seconds)
Published: Wed May 17 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.