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
nrook
Jun 25, 2009

Just let yourself become a worthless person!

Shaggar posted:

my variables are properly named cause I use java conventions instead of p-lang conventions

so like I would make the variable that stores the current date
Java code:
currentDate
whereas in a p-lang it might be
Python code:
____3fcxSF_dd_x

the funny thing is this is the best way to do things in p-langs too, if anything it's more important because you don't have the type system to at least give you a hint for what that variable is

but it's not done every time because p-langers are dum

Adbot
ADBOT LOVES YOU

nrook
Jun 25, 2009

Just let yourself become a worthless person!
I like static typing too but c'mon dudes, if you pass the wrong type to a method by accident in python your unit tests will catch it anyway

it's not that big a deal

nrook
Jun 25, 2009

Just let yourself become a worthless person!
they can both be true

tbc can genuinely like and appreciate php as a language and still troll all you about 2d9++++

welcome to yospos, everyone either has a gimmick or is fuckin boring and worthless

nrook
Jun 25, 2009

Just let yourself become a worthless person!

Shaggar posted:

guice is google which means it died in beta. don't use it. also you shouldn't have annotations related to spring in ur code.

what guice is fine and will live on forever

a mysterious ghost, haunting your constructors with spooky objects you can't find

nrook
Jun 25, 2009

Just let yourself become a worthless person!

prefect posted:

Just one reason why I get hives at the thought of letting developers touch production boxes. ;)

Doesn't Visual Studio have remote debugging built in anyway? My last job was at a windows shop and I seem to recall something like that existing.

nrook
Jun 25, 2009

Just let yourself become a worthless person!

FamDav posted:

its good for dumb langs that do it but the problem is nullable should never be the default.

When I'm writing java and every single bit of input has to be checked to make sure that it isn't secretly null thus causing an awesome runtime exception is, well, dumb.

A String isn't null. A String is a list of bytes/codepoints/whatever that roughly correspond with what we'd call text.

to be fair this is more depressing in a statically typed language than in a dynamically typed one

in like python, the thing you expect to be a string might also be a Cheeseburger object, so the fact that it might also be None is not as big a deal

but in java, I mean, poo poo dudes, if I wanted my inputs to be random things I didn't recognize I'd be writing python

nrook
Jun 25, 2009

Just let yourself become a worthless person!
tbc was right, you want very broad booleans in a dynamically typed language

code:
if not some_list:
instead of
code:
if len(some_list) == 0:
weirded me out when I first started coding python, but I've grown to appreciate it

nrook
Jun 25, 2009

Just let yourself become a worthless person!

Jonny 290 posted:

testing is hugely important and nobody wants to do it because you can't add those LOC counts to the finished project and bill the customer for them

isn't this the whole point of unit tests?

if you put the tests right next to the code, you can trick the developers into writing them, plus count them as part of the codebase!

plus you feel really robust when you have to change 1000 tests that mock out your db when you change a bool into an enum

nrook
Jun 25, 2009

Just let yourself become a worthless person!
there's a weird vibe going on that you write unit tests so that your code doesn't explode the golden gate bridge and kill hundreds

you write unit tests because it's faster in the medium term than not writing them. "management" doesn't care about best practices, but what they do care about is three years down the line, Fuckface unit has happy customers and more rapid development, and Bitchass team can't find their rear end with both their hands, and guess why?

unit tests

this is especially true in dynamically typed languages, I have no clue how you'd write python without tests. unless you love seeing TypeError in your production logs I guess?

note: I dunno if this applies to scrappy startups with two developers and it probably doesn't apply to games unless you're blizzard. but if you care at all about v2 you gotta write tests bro

nrook fucked around with this message at 03:55 on Apr 24, 2014

nrook
Jun 25, 2009

Just let yourself become a worthless person!

Spime Wrangler posted:

nrook: unit tests are a different from big-E Engineering risk assessment and mitigation processes like FMEA

they play a role but the key element is the process of stepping back from design, enumerating all the ways each part of the system can fail (hardware, software, user, etc), enumerating all the immediate and eventual effects of those failures, and systematically designing them out of the system where possible. from an FMEA perspective, unit and integration tests are a tool to make sure that specific failure modes have been eliminated or mitigated. the FMEA process is there to help make sure you're testing for the right things in the right way and prioritizing them properly.

yeah, that's what I wanted to make explicit, though it sounds like I failed

unit tests (and integration tests too) are just something you do when writing good code. "engineering" is something different and more expansive

nrook
Jun 25, 2009

Just let yourself become a worthless person!

Mr Dog posted:

I bet that integrates terrificaly with your source control system (as long as it is Microsoft Visual Studio Team Foundation Server Professional 2013 for Cloud Application Architects Professional Edition (probably not even then)) or with unit testing or with continuous integration or with anything automated whatsoever.

google is going in this direction

standard conflict-of-interest disclaimer

nrook
Jun 25, 2009

Just let yourself become a worthless person!
I dunno as someone who had no idea what git push origin :branch did it doesn't bother me either

I mean, it's not like you would do that accidentally or even have it in your mental model, right? you'd just read about it somewhere and think "huh, that's weird. I guess it kind of makes sense but that's weird." but it's not going to limit anybody's comprehension of git

nrook
Jun 25, 2009

Just let yourself become a worthless person!
yeah, actually that sounds cool, and helpful for basically any language

nrook
Jun 25, 2009

Just let yourself become a worthless person!

qntm posted:

shrinking empty lines is a cool and useful thing no matter what your brace style is

yeah, I was going to make a smug python comment before I realized this helps python too, just to a lesser degree than it helps languages with braces

really it just owns a whole lot

next up: make parentheses real big, so they can literally encompass the relevant code? actually I'm not sure that one is a good idea

also. p-langs are unbearable without unit tests to catch dumb errors (lol that that's necessary, but it's true). you have good unit tests right?

nrook
Jun 25, 2009

Just let yourself become a worthless person!

fidel sarcastro posted:

nope. no staging environment either. deploy and pray (for death).

I wonder how many small modern/startup shops have unit tests

I feel like the answer to this question would be really depressing

or maybe unit tests are gonna become cool real soon! I gotta believe

nrook
Jun 25, 2009

Just let yourself become a worthless person!
it’s terrible for chess analysis, since engines written in it only seem to find sharp lines

nrook
Jun 25, 2009

Just let yourself become a worthless person!
I work on a medium sized production Python code base at work, and let me tell you: I lust for death.

nrook
Jun 25, 2009

Just let yourself become a worthless person!
I got to tell a friend about for else recently

nrook
Jun 25, 2009

Just let yourself become a worthless person!
in b2b the user whose experience you care about is the cto, and the department whose job it is to improve their experience is called sales. there are exceptions to this model (slack spread a lot through subaltern word of mouth) but they are rare

nrook
Jun 25, 2009

Just let yourself become a worthless person!

Sapozhnik posted:

https://lwn.net/Articles/900739/ - July 2022 - Native Python support for units?
https://lwn.net/Articles/906512/ - August 2022 - Python multi-level break and continue
https://lwn.net/Articles/907226/ - September 2022 - Lazy imports for Python
https://lwn.net/Articles/912353/ - October 2022 - An ordered set for Python?

Nothing in November yet but we still have a couple of weeks to go!

gently caress Python and every loving idiot involved in its development

I read the first article and it seems like they didn’t do anything to the language as a result of the discussion? I’m not sure what you’re so mad about here

nrook
Jun 25, 2009

Just let yourself become a worthless person!
my team at work used to use python for developer tools. we’re switching to go for new things (I lost the argument for java and tbh java is a dubious fit anyway because of start up latency).

one guy thinks we should have picked c++ but while I really hate go, I don’t think I hate it that much

Adbot
ADBOT LOVES YOU

nrook
Jun 25, 2009

Just let yourself become a worthless person!

minidracula posted:

Please do let me know how this... goes.

:rimshot:

No, seriously, I am curious how this works out for you/your team at work in practice. It's something I've heard not infrequently, and I've thought along similar lines the last several years (not just WRT moving from Python, but inclusive of that as well) for various reasons (which I can get into somewhat if anyone cares), but I'm always interested in more trip reports.

ironically the thing I hate most about go isn’t actually a real problem with the language. rather, the house style for unit tests is this insufferable table-based approach, which creates irritatingly long and verbose parameterized tests.

I do think the language is well-suited to devtools just insofar as it’s very straightforward, fast, but has garbage collection. But even so I’d rather be writing something else

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