Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
comedyblissoption
Mar 15, 2006

Finster Dexter posted:

I think the CEO is willing to take feedback
lol

Adbot
ADBOT LOVES YOU

comedyblissoption
Mar 15, 2006

the ceo is figuratively cracking the whip and complaining about his employees being lazy

i have a feeling he's not willing to listen to constructive feedback on how he is being unreasonable here

comedyblissoption
Mar 15, 2006

your ceo is saying instead of your workplace being a cool place to hang out and keep morale high with happy workers, your workplace should instead be:
https://www.youtube.com/watch?v=WXh1tW16V-8

comedyblissoption
Mar 15, 2006

lol that the world is run by a bunch of parasites lording over you that you have to constantly appease and handhold

comedyblissoption
Mar 15, 2006

the ceo by his own admission is looking down on someone negatively purely because he is using butts-in-seats as his guiding productivity metric btw

comedyblissoption
Mar 15, 2006

i used vanilla emacs w/ a bunch of customizations

i now use spacemacs and i'm never going back. i'd rather crowdsource a bunch of autists managing my config instead of becoming the autist myself

comedyblissoption
Mar 15, 2006

implicit this for member variables sucks (in C++, java, and C#) because you will get variable name collisions and you can get confused about scope

it's such a problem that lots of programming conventions will make internal member variables be prefixed with strings like "_" or "m_"

comedyblissoption
Mar 15, 2006

the other criticism you could make against self/this is that rust shouldn't have had member functions in the first place and tried to be more like a functional programming lang

for better or for worse, Rust intentionally wanted its syntax to be more familiar to the mainstream and not turn off people by making its syntax look like haskell or ml or whatever

comedyblissoption
Mar 15, 2006

i hate golang as much as anyone but dont they have some type of panic and recovery mechanism for goroutines?

now, you might have to copy paste a shitload of boilerplate across every single goroutine to actually handle panics within a process, but the capability seems there?

https://golangbot.com/panic-and-recover/

comedyblissoption
Mar 15, 2006

MononcQc posted:

the entire idiocy of go's error handling is not that you need to check the return values here and there; monad and maybe types have you do that in Haskell or Rust all the time, so do Erlang and Elixir's tuples.

The stupid part of it is that go will not be mad if you don't check them and will happily keep on trucking into undefined program behaviour and do whatever it can without bailing out. Then the goroutine may vanish, but it will do so silently and undetectably for the most part, so you're stuck with a bunch of partly-failed and leaked goroutines with possibly busted memory, but from the outside, the little binary looks like it's doing fantastic
rob pike's literal unironic solution to this problem is to not do that

comedyblissoption
Mar 15, 2006

DONT THREAD ON ME posted:

i have a basic generic linked list and if i want to define map it's all pointers to void and casting. pretty gross.
void pointer casting blesses you with the worst of all worlds of both a shittier unsafe type system combined with potentially shittier performance

comedyblissoption
Mar 15, 2006

DONT THREAD ON ME posted:

yeah, it's a very different approach. my main worry is ambiguity, it seems like you could easily have two different types that each have a "foo" method with the same input/return types but wildly different semantics. it's like duck typing.
this kind of typing in golang based on the structure of a type is called structural typing

as opposed to nominative typing which relies on you naming your types so you avoid the above problem

comedyblissoption
Mar 15, 2006

eschaton posted:

why did Rust go with its memory model instead of something like ARC where the semantics are a bit less opaque?
performance

you can still do RC (reference counted) and ARC (atomic reference counted) in rust

a language implicitly doing some garbage collection or reference counting strategy for you incurs memory and cpu overhead that is not appropriate for the type of programming niche rust wants to fill

comedyblissoption fucked around with this message at 05:11 on Sep 3, 2018

comedyblissoption
Mar 15, 2006

rust's borrow rules also improve program correctness beyond what garbage collection and reference counting schemes offer

the rules statically prevent you from incorrectly read or writing to data that you should not in certain scopes. some prominent examples:
  • if you are in the middle of iterating on a vector, the borrow rules statically prevent you from incorrectly adding elements to the vector.
  • if you've moved data, you are not allowed to use the old reference anymore
  • the rules statically prevent shared memory race conditions in concurrent programs
  • if you have a reference to an element of the vector and someone pushes to the vector, rust forbids this because the alternative is a use after free bug. this problem can crop up whenever you alias memory in c++. garbage collection/reference counting can prevent this one

in c++/java, violation of these rules can cause undefined behavior that you don't know about or a program exception

rust's rules also encourages a design with less shared mutable and less global state. this probably improves programmer productivity

some articles about this:
https://manishearth.github.io/blog/2015/05/03/where-rust-really-shines/
https://manishearth.github.io/blog/2015/05/17/the-problem-with-shared-mutability/

comedyblissoption
Mar 15, 2006

NihilCredo posted:

big big big disclaimer: don't forget to make your objs immutable, otherwise the ez correctness goes out of the window
oh yah that's another cool thing about rust's borrowing rules

rust shows that immutable vs mutable data structures for correctness vs performance is a false dichotomy

you can do both

just have mutable data structures and make them immutable/mutable in a scope

you don't need a separate StringBuilder class

comedyblissoption
Mar 15, 2006

not really

str is a string slice and has no equivalent in java's std lib afaik

edit: i know you're joking but people can get easily confused about it and i don't want them to lol

comedyblissoption
Mar 15, 2006

is there something better than git's distributed immutable dag for programming source control

seems deece enough for me

comedyblissoption
Mar 15, 2006

yah those are all totally valid criticisms, but the broad strokes of git seem good enough

the really lovely cli seems remedy-able with good enough wrappers (e.g. magit)

and I personally want rebase to "destroy" history, but maybe that's b/c I'm unaware of alternatives

comedyblissoption
Mar 15, 2006

we must pay for our sins in eternal torment

such is the nature of touching computers

comedyblissoption
Mar 15, 2006

i stopped believing in the unix philosophy when i saw higher order functions and realized that piping plain old text between programs is a really lovely way to program

comedyblissoption
Mar 15, 2006

here's a fantastic article showing the myriad ways that the unix philosophy composes very poorly and why you should never create significant programs out of shell scriptlangs
http://mkremins.github.io/blog/unix-not-acceptable-unix/

comedyblissoption
Mar 15, 2006

Shaggar posted:

theres no reason to not leave all those commits in other than bullshit ego. nobody gives a poo poo if you wrote something dumb in an initial revision, we care that the history is there so we can go back for context or to retrieve aborted designs that should be revisited.
having a bunch of garbage worthless commits makes looking at the history of the project and its changes very painful. trying to rollback functionality or use git bisect or any tooling dealing with the history of the project becomes way more difficult if it's full of interim garbage commits that need to be pieced together to say this is tied to feature X

being able to make a bunch of garbage commits in a branch no one else cares about that you can throw away later speeds up development because your garbage commits don't need to pass the full suite of tests on the remote server for check-in and you have a 0% chance of impeding anyone else's development or being impeded by someone else's garbage interim commits. being impeded by garbage interim commits breaking poo poo was a problem at my previous workplace with like a couple dozen devs and SVN. this hasn't been a problem w/ git

comedyblissoption
Mar 15, 2006

Symbolic Butt posted:

I watched almost all of it, around 30min he finally gets to the main point which is this:


and he isn't 100% sure if that's what's really going on, which is fine but I'm not sure why he is wrapping this query in an 1 hour long video rant

btw this is a pattern that I noticed about rust programmers before and in the end maybe he kinda has a point here but just lol at jblow
the only way you "turn off" the static borrow checker is wrapping your stuff in abstractions like RC (like reference-counted smart pointers) though, and rust idioms typically don't require you to do this

I don't really see how jblow's paraphrased criticism is applicable, and I'm not willing to watch an hour long rant to see him ignore all the benefits of the system

edit: i guess the other interpretation here is i guess he means you start programming in a style you don't need to constantly borrow poo poo in the first place like you might in other languages? i really don't see anything wrong with this

comedyblissoption fucked around with this message at 20:02 on Sep 14, 2018

comedyblissoption
Mar 15, 2006

weed-out courses are a dumb idea

but even if you wanted a weed-out course, you could make your weed-out course still have actual programming

making people program in pseudocode for a course before they are allowed to program is pedagogical malpractice

comedyblissoption
Mar 15, 2006

Soricidus posted:

depends how the course is branded really. if it's computer science then that's a branch of mathematics and it's perfectly reasonable to start with theory instead of getting bogged down in "no you just have to write public static because the compiler demands it don;t worry about why yet" from day 1
i'd say computer science students would be more bogged down by being crippled from not being able to write computer programs and being able to apply their theory in practice

you can teach theory in tandem with writing actual programs running on non-abstract machines. this isn't the early 20th century

comedyblissoption
Mar 15, 2006

programming and computer science go hand in hand

teaching programming without theory or theory without programming is bad

comedyblissoption
Mar 15, 2006

i like emacs b/c i think it has a legit better UI and philosophy for editing text for whatever than flavor of the month editors

its anachronism has ironically made it make better UI decisions. a text-based interface has lots of pros over guis

comedyblissoption fucked around with this message at 12:29 on Sep 24, 2018

comedyblissoption
Mar 15, 2006

make sure you use :thunk: for thunks for improved clarity

comedyblissoption
Mar 15, 2006

always focus on whats best for yourself and do not chase some stupidass poisoned carrot on a stick your boss puts on your head

comedyblissoption
Mar 15, 2006

you just have to be a mindreader whose telepathy can also read minds into the future and be a legal and financial expert to properly evaluate your stock options

comedyblissoption
Mar 15, 2006

clean code doesnt really go into the ideas of 'minimize mutable state' and 'prefer pure functions' and why you would want that

it also seems to embrace implementation inheritance with examples like SalariedEmployee and HourlyEmployee inherit from Employee which will look reasonable at tiny examples but breaks down as you get more complex

it also eschews higher order functions, but that's b/c it's a very 90s-00s java book instead of a general treatise on code

a starting point for a great book on how to write better code for the uninitiated would look something like this:
http://loup-vaillant.fr/articles/good-code
http://loup-vaillant.fr/articles/good-code-2

comedyblissoption
Mar 15, 2006

surely western governments would never pressure company employees to access that data and hand it over

comedyblissoption
Mar 15, 2006

Xarn posted:

Shitposting aside, I am surprised it doesn't mention the principle of "use the least powerful language construct you can".
it explicitly advocates this

comedyblissoption
Mar 15, 2006

DELETE CASCADE posted:

when i was in school i remember being taught that oop was about things like encapsulation, polymorphism, and inheritance. when in fact those are just general programming concepts that ooplords hijacked, and the only fundamental feature of oop is dynamic dispatch
dynamic dispatch is definitely also a general programming thing and features prominently in traits based systems in 'functional' langs

the only feature i think that is really specific to langs billing themselves as oop is implementation inheritance, and the oop communities have somewhat or totally maligned that feature

to be fair, OOP langs like C++ or java were contending at the time with langs like C in which encapsulation of structs was not commonly practiced

comedyblissoption
Mar 15, 2006

imo you should have to instantiate an instance of Math before you can call sqrt

comedyblissoption
Mar 15, 2006

avoid using static methods. why? b/c oop babies throw a tantrum if you dont

Adbot
ADBOT LOVES YOU

comedyblissoption
Mar 15, 2006

maybe the common paradigms for designing software are a lot more cache hostile today?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply