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
Soricidus
Oct 21, 2010
freedom-hating statist shill

cinci zoo sniper posted:

if you dep to windows the conda env is an option, otherwise (and maybe in general) check out pipenv, it’s the new hotness

quote:

Pipenv is a dependency manager for Python projects. If you’re familiar with Node.js’ npm

is where i stopped reading

Adbot
ADBOT LOVES YOU

Soricidus
Oct 21, 2010
freedom-hating statist shill

Lutha Mahtin posted:

i did too. if one's goal is to learn the general theory and practice of how native code is executed on hardware, I'd definitely suggest going with an easy to learn architecture like MIPS

just ... not the kind of mips they used in ps1-era consoles, in which the instruction after a jump is always executed even if the jump was taken, and the instruction after a read or store will still see the old value

Soricidus
Oct 21, 2010
freedom-hating statist shill

flakeloaf posted:

file io in c++ is hard and it makes me feel stupid

just #include <cstdio>

Soricidus
Oct 21, 2010
freedom-hating statist shill
delphi is the answer. all the good parts of vb but with a not entirely terrible language behind it

Soricidus
Oct 21, 2010
freedom-hating statist shill
replaced a horrendously fragile mess of regexes with an antlr grammar today

naturally the main outcome is that i am now aware that none of the inputs are actually well-formed

Soricidus
Oct 21, 2010
freedom-hating statist shill

Luigi Thirty posted:

the Russians used a pointer

Soricidus
Oct 21, 2010
freedom-hating statist shill

Toady posted:

i've never understood why there are two programming threads

there is a thread where we admit we’re terrible programmers and a thread where we pretend we’re not

Soricidus
Oct 21, 2010
freedom-hating statist shill
ctps: copy constructors are hard so I just did clone() { return unserialize(seriallize(this)); }

Soricidus
Oct 21, 2010
freedom-hating statist shill

comedyblissoption posted:

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

hello I literally have autism and my .emacs.d/init.el is about 8 lines long

Soricidus
Oct 21, 2010
freedom-hating statist shill

gonadic io posted:

goddamn logstash literally has a literal 12 minute startup time

Apparently it's written in jruby and the plugins are written in Ruby itself which get evaled a bunch

the performance of ruby, the simplicity of the jvm. what’s not to like

Soricidus
Oct 21, 2010
freedom-hating statist shill

MALE SHOEGAZE posted:

i would like to have a deeper understanding of how computers work, and i would like to pursue career paths where having a deeper understanding of how computers work is important.

I take it you’re aware that all modern processors actually compile the asm down to javascript and execute that

Soricidus
Oct 21, 2010
freedom-hating statist shill

MALE SHOEGAZE posted:

^^ once twice refactor is such a good rule of thumb.


i don't have good resources, unfortunately, but maybe this will help you figure out what to look for:

professional code, in the domain we're discussing, is all about writing code that can be easily evolved, maintained, and tested. additionally, it's about learning how make changes that are easily evolved, maintainable, and testable to a legacy application that is none of the above.

it's really hard to learn how to do this stuff without actually doing it, mostly because it's loving tedious and no one wants to write a tutorial that involves digging through a 400k LoC legacy enterprise app to figure out where you can safely graft in some feature.

personally, i've found the functional approach incredibly useful to me throughout my career. i dabbled in haskell very early in my programming development, and while i remember little to nothing about haskell, a few of the functional concepts stuck with me and i think they helped me a lot, even when i was working on a terrible rails app. there are very few places where you can't escape from some stateful context into a pure function.

but you also probably need to learn standard OOP and MVC.

this is a good post. learning new languages is good (even if they’re not widely used for real work), learning industry standard methodologies is good (even if yospos rightly sneers at them)

basically imo if you’re learning something then you’re doing it right. learn Haskell, learn x86 asm, learn spring or asp mvc, it will all help your brain develop in useful ways. the genuinely terrible programmers are the ones who learn to do exactly one thing and then try to rely on that their whole career.

Soricidus
Oct 21, 2010
freedom-hating statist shill
one good reason to learn asm imo is that it forces you to think about how your code is structured, because careless or poorly documented code becomes unmaintainable after a few dozen lines of code at most, whereas in a higher level language you can get away with hundreds or even thousands of lines of bad code and still be able to work with it

you almost certainly shouldn’t be using asm for anything real (unless you’re working in some very specific domains), but it’s a nice didactic tool

Soricidus
Oct 21, 2010
freedom-hating statist shill

Captain Foo posted:

what's a unit test

code:
@Test
public void unit()
{
    assertEquals(1, this.length);
}

Soricidus
Oct 21, 2010
freedom-hating statist shill

Stringent posted:

quoting from way back, but learning vi is pretty much the equivalent to picking up smoking.
i've tried quitting vi off and on for like 15 years and i always keep coming back.

it’s useful if you ever ssh into a barebones linux, or if you sudoedit without remembering to set EDITOR and can’t be bothered to change programs

here is a complete cheat sheet of vi commands worth learning:

  • i - make it behave like a normal program so you can type things
  • esc :wq - save and quit

Soricidus
Oct 21, 2010
freedom-hating statist shill

Finster Dexter posted:

I dunno, part of my bias could be the fact that the bulk of my gitlab experience has been from the on prem gitlab our Russian contractors are using.

i didn't realise you wrote software for voting machines

Soricidus
Oct 21, 2010
freedom-hating statist shill

Sapozhnik posted:

this is like the "i listen to everything except rap and country" of programming opinions

no, people who reject rap and country out of prejudice are incorrect

Soricidus
Oct 21, 2010
freedom-hating statist shill

Schadenboner posted:

How can I get myself to a place where any of what you guys are talking about makes any sense?

:(

yosposter, on deathbed: "that time i spent with people i loved was ok i guess, but drat i wish i'd had a better grasp of pl theory"

Soricidus
Oct 21, 2010
freedom-hating statist shill
you know you're in for a good day programming when you open up the code you need to debug and the first thing you see is
code:
result = None
for key, value in data.items():
    if key == 'butt':
        result = value
if result:
    result.poop()

Soricidus
Oct 21, 2010
freedom-hating statist shill

Sapozhnik posted:

:ssh: java 10 has local variable type inference

so does java 8, if you’re not allergic to lombok

Soricidus
Oct 21, 2010
freedom-hating statist shill

CRIP EATIN BREAD posted:

lombok is super bad.

why?

the implementation is probably hideous but I haven’t run into any problems as a user

admittedly I don’t touch the parts that generate a bunch of methods, just lombok.val

Soricidus
Oct 21, 2010
freedom-hating statist shill
very carefully

Soricidus
Oct 21, 2010
freedom-hating statist shill

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.

i guess you build better tools on top of this though.

I thought you were doing c not go

Soricidus
Oct 21, 2010
freedom-hating statist shill

AggressivelyStupid posted:

code:
NUM_OF_BYTES = 9;
char* foo = (char*)malloc(NUM_OF_BYTES*sizeof(char));

appropriate username/code combo

Soricidus
Oct 21, 2010
freedom-hating statist shill

uhuh

Soricidus
Oct 21, 2010
freedom-hating statist shill

comedyblissoption posted:

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

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

Soricidus
Oct 21, 2010
freedom-hating statist shill
I helped debug a thing today where it turned out the third party api returned 200 application/json in all cases, but if there was an error then sometimes the content was not in fact json

please do not do this.

Soricidus
Oct 21, 2010
freedom-hating statist shill

Chalks posted:

It depends how you define your endpoint. If the functionality is "create this user or return details of the user if it already exists" it's not an error condition if it already exists. Something can "fail" to do what the user is attempting, without being an error as long as it's an anticipated part of your process flow.

An error condition of "everything is completely fine, we expect this to happen all the time" isn't really an error condition. There was no mistake.

yes, but that kind of case isn’t what the other side is talking about

I’m talking about poo poo like getting a 200 if you provide incorrect credentials, which is a textbook loving 401. I’d also accept 403. not 200. and the server still claims it sent you application/json even though the content is the bare text “invalid credentials”

Soricidus
Oct 21, 2010
freedom-hating statist shill

anatoliy pltkrvkay posted:

thankfully we now have HTTP/2, aka "content-length mismatches are now a fatal error, get hosed"

not that the mismatches didn't not cause issues in http/1.1, but half the time it would cause request/response handling to only degrade somewhat and still more or less succeed

im curious if the [hard fail in http/2](https://httpwg.org/specs/rfc7540.html#malformed) was actually necessary to implement the stream multiplexing stuff (decent chance that it is, idk, don't want to wander through a bunch of old ietf mailing lists) or just that one of the authors was so fed up with handling weird length mismatch gremlin bugs that they wrote the spec that way (much more amusing)

we’ve learned the hard way that the so-called robustness principle is a terrible idea that inevitably leads to security disasters. eg a different kind of content body not matching content length was literally the bug behind heartbleed. maybe it’s harmless in an http context but it’s better to just force terrible programmers to fix our terrible code and not take the risk.

Soricidus
Oct 21, 2010
freedom-hating statist shill

The_Franz posted:

no, "basic" text editors shouldn't require you to read a manual just to figure out how to move the cursor, make a simple change and save the file

nano and edit.com are basic text editors. vim and emacs are not.

except in emacs you can move the cursor by pressing the cursor keys, and save the file by either clicking on the “save” icon in the toolbar or selecting “save” from the file menu, just like other editors? it’s pretty simple. and most of the common keyboard shortcuts are the same as in bash so you’ll want to get used to them anyway if you’re using a linux.

MononcQc posted:

how come everyone wanting to interrupt a topic in this thread does it to talk about rust-related things?

I’m glad rust is the current hipste

Soricidus
Oct 21, 2010
freedom-hating statist shill

akadajet posted:

nano works mostly okay, shaggar

nano is really bad. the only reason for anyone to start using it today is because emacs and vi use non-standard keyboard shortcuts ... except so does nano so that’s not much of an improvement. just learn a proper editor if you ever actually need to edit files in a terminal, which you probably don’t

Soricidus
Oct 21, 2010
freedom-hating statist shill

jit bull transpile posted:

lol all the scala idiots in my org are gonna get so much louder now

do they not understand that this affects scala in exactly the same way as it affects java

Soricidus
Oct 21, 2010
freedom-hating statist shill

gonadic io posted:

In general I have found haskell library documentation to be quite poor

you have the type signature, what more could you possibly need

Soricidus
Oct 21, 2010
freedom-hating statist shill

mystes posted:

Didn't he say they were literally not allowed to use other companies' IDEs anyway? So I don't think they have much choice about dogfooding unless they have a secret less lovely internal IDE.

I mean there is a third option: no ide

literally saw someone internally arguing in favor of writing code in loving notepad++ the other day. thank god they weren’t working on anything I’ll ever have to touch

Soricidus
Oct 21, 2010
freedom-hating statist shill
ctps: major third-party dependency finally has a version that supports java 9+ so now we're looking at updating our stuff! :toot:

except we still have to support java 8 as well. multi-release jars look like the way to go but every time i look into how to actually produce them i find myself contemplating a career change

Soricidus
Oct 21, 2010
freedom-hating statist shill

Main Paineframe posted:

current terrible programmer status: for OO practice and refreshing my vague memories of Java, i made a little card game engine

and then when i got it mostly working, i realized i hadn't given any thought at all to giving it a user interface

so now i have to either learn Java graphics or learn how to turn this thing into a web application in Java

the scope of my little practice project is rapidly expanding

make a text-mode ui, there must be java bindings for ncurses or w/e

Soricidus
Oct 21, 2010
freedom-hating statist shill
lol if your login page doesn’t send the plaintext password for a client side check

Soricidus
Oct 21, 2010
freedom-hating statist shill
ctps: git continues to have the worst, most user-hostile interface ever designed

who the gently caress thought that it was a good idea to have both "git show revision path" and "git show revision:path", and for them to do completely different things

Soricidus
Oct 21, 2010
freedom-hating statist shill
ctps: somehow I’ve ended up writing a perl script

Adbot
ADBOT LOVES YOU

Soricidus
Oct 21, 2010
freedom-hating statist shill

Finster Dexter posted:

I know I'm lttp for js spa talk, but at the risk of shaggaring I have the horrible opinion that asp.net core mvc with plain ol' razor views is the pinnacle of webdev right now. I want server-side rendering and jfc get nodejs away from me eww gross

The worst thing MS dotnet team has done in a while, is rolling all the frontend js poo poo into the default templates.

The age of webassm can't get here fast enough.

so you’ll be able to write the same lovely spas using equally lovely frameworks ...... but with all the joys of c++ on top?

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