We're facing the possibility of changing the VAT from 24 to 25.5% here in Finland. My thoughts and prayers with all the financial sector programmers who get to patch all the systems where the VAT field is an integer without additional precision capabilities.

Di4na, avatar

@nicd that is rare because load of country have or have had other rate. And it is not rare for some industry to have a decimal and different vat

henrikjernevad, avatar

I think that testable code is reusable code. When you test a function, you run the code in another context than it was built for (the production code). If your code is not reusable you will feel that pain in your tests.

This blog post gives an example of how getting side effects out of functions make them both easier to test and reuse.

underlap, avatar

@henrikjernevad Nice example of the single responsibility principle too.

owiecc, avatar

Can any of you suggest a 2D plotting library for Rust? I need to plot some polygons on a canvas and save to (ideally) pdf.

fil, avatar

Looks like plotters is the default, its documentation has a "snowflake" example, which might be what you are looking for. There are also a couple of alternatives

sos, avatar

I hate when programmers tell other programmers "Don't do this" "Don't do that". Don't listen to these people.

And don't gatekeep other people's code. Let people program however they want.

Worst thing is, person posting this DOES use early return in their code.

I think programmers just think they're better than others. "I can do this, but you can't". Don't be like that. It's not OK.

#programming #coding

sol_hsa, avatar

@slembcke @sos
Wouldn't know. But if you think of a very complex function with many nested structures, having a random return in the middle of it can make it really hard to parse.

Nifflas, avatar

@sos yeah, I agree so much! The better of a programmer I become, the more I learn it's not about knowing what to always do, or never do - but knowing when to do what.

Plus, I use different practices for different contexts. In networking code or anything where security is a factor I avoid patterns I'd happily use for game logic.

schenklklopfer, German avatar

Grund 409638045983 warum ich dieses ganze Universum verachte:

Habe Code - nicht meiner, kann daran nichts ändern.
Code hat sich seit 7 Monaten nicht geändert.
Vor 7 Monaten ist die Pipeline gelaufen und hat ein Image erfolgreich gebaut.
Heute läuft die Pipeline nicht mehr, weil sich irgendeine Abhängigkeit anders verhält als vor 7 Montaten.

Und nu?

Ja, bleiben diese 9,8er CVEs halt drin in dem Image, weil neu Bauen geht nicht.

thomas, avatar

@schenklklopfer wo es in der Firma nicht anders geht, sichern wir uns mittlerweile den ganzen node_modules Ordner weg und archivieren den. Einfach vor Angst, dass mal ein Modul nicht mehr verfügbar sein könnte oder irgendein anderer Scheiß passiert. Hilft aber natürlich nicht bei CVEs.

notsle, avatar

The Time Lords have a special torture chamber on Gallifrey for app developers that write apps, used cross timezones but dont properly store timezone data.

vga256, avatar

i'm embarrassed to say that it took me 5 hours to understand 9% of lua's metatables so i could implement basic OOP inheritance

i swear that 3/4 of my time is spent unlearning C++

mezz, avatar

@vga256 Metatables are fun, especially once you start overriding the lookup function and do whackier stuff than just inheritance :cat_sip:.

vga256, avatar

@mezz yup that is the plan. just wanted to get the basics working first

dominucco, avatar

One of the best ways to bond with your kids is through coding! This Sunday, why not try coding up a classic game with Pygame? It's a fun and easy way to introduce your child to the world of programming. Check out this quick getting started guide and have a happy Funday! #programming #stem #python


wervice, avatar

What is your favorite programming language?

stevensanderson, avatar
ngmi, avatar

@wervice rust, but I'm bad at it 😂

maralorn, avatar

current status: calling a executable from typed template

pmidden, avatar

@maralorn uhmm, isn't this just "exec()"? 😃 (or createProcess, whatever)

maralorn, avatar

@pmidden Yeah, I am not saying it’s complicated, it just feels a little cursed.

ross, avatar

I was thinking about the Lean Scala hubbub when a song from an early Chicago album came on shuffle. Chicago's "legacy" albums adroitly blended genres in ways few did before or since, until the band pivoted to AOR and Christmas albums, alienating most of its fans.

Anyway, I'm going to go listen to Chicago II. It still sounds great and it's still here.

jonoabroad, avatar

@ross lean is good, expecting everything to be ditched for shiny new smacks of no real world experience.

kzoneind, avatar

: are used in computer programming to implement .

What are the different types of Programming Languages? What are the trends in design?

amigalove, avatar

Won’t this be fun?

(Back in the day I was desperate enough to try…)


RL_Dane, avatar


Yowza, that's a LOT of DATA statements. %)

eed3si9n, avatar

scopt 4.1.0 is back published to 2.12, 2.13, and Scala 3 on Scala Native 0.5.x

scopt is a little command line options parsing library

vascorsd, avatar

Been having fun with , made more than a hundred lines of code with it. It's really refreshing having a language that compiles fast and takes barely any memory and cpu to run.

Not having to care about the build tool too much, hundreds of compiler flags, language versions, compiler plugins, formatting plugins, or any of the usual things that fill the brain I'm used to in is a huge breath of fresh air.

Not having to care about the JVM is amazing.

vascorsd, (edited ) avatar

The syntax sometimes is not very pretty (subjective). Functions receiving functions as parameters get a bit ugly with 'x |› map(fn(v) { ““ })' feeling like having too many parentheses.

syntax is prettier in this aspect with
' { v =› "" }’ being more lightweight.

And formatting sometimes doesn't do what I'd like.

And I dearly miss the 'for { y <- stuff } yield ""' syntax. The 'use syntax' doesn't really click with me yet.

Anyway, overall, great experience 😉

vascorsd, avatar

Was writing a bit of code here:

The gleam command is really great. Any language nowadays not having a full integrated DX in a single command to drive the code will not survive in the next decade.

gleam docs is really nice and quick too.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming
  • DreamBathrooms
  • magazineikmin
  • khanakhh
  • everett
  • Youngstown
  • slotface
  • GTA5RPClips
  • cisconetworking
  • Durango
  • rosin
  • modclub
  • kavyap
  • thenastyranch
  • InstantRegret
  • bokunoheroacademia
  • mdbf
  • ethstaker
  • cubers
  • Leos
  • tacticalgear
  • anitta
  • normalnudes
  • osvaldo12
  • tester
  • lostlight
  • relationshipadvice
  • HellsKitchen
  • sketchdaily
  • All magazines