_alen

@_alen@mastodon.social

#softwaredeveloper and #phd student. Interested in language engineering, DSLs and distributed systems.

At my free time, I play guitar and train my German Shepherd.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

_alen, to python

At first, I didn’t like type hints in #Python, but we decided to give it a go since our codebase really exploded in the last couple of years. All I can say now is we should have done it earlier. I still find it unbealivable that we discovered so many small bugs that went unnoticed all these years.

_alen,

@Stark9837 I totally understand. In our case, including #mypy in CI pipeline made us more disciplined.

_alen,

@folkerschamel @cazabon assertions are ok if you’re not using -O flag, but also they can bloat the code if used in many places.

You can use if-guards also, but sometimes it turns out that most of the code is there to perform simple validations. With type hints and mypy, you can omit the type-related validation part and focus on the business logic.

_alen,

@folkerschamel That's a valid question, and in some cases utilizing a statically typed language makes sense. However, the cost of introducing another language would be greater than adding type hints, especially in our case since we have a lot of folks that are writing Python code but are not developers per se.

Basically, with small, incremental modifications we are able to gradually improve the code quality without compromising productivity.

fell, to programming
@fell@ma.fellr.net avatar

Without going into too much detail, my thesis was criticised for developing a web service with C++. I It was questioned why I didn't use #NodeJS or #Java for the web service. "It's not performance critical" said the professor.

Dude, have you used the internet lately?

EVERYTHING is performance critical!

This sort of teaching explains why most aps/websites run like absolute dogshit.

Why is #performance never an academic criteria?

I wish @cmuratori could see this...

#cpp #programming

_alen,

@folkerschamel @fell I agree with this. In my experience, people asume that something is slow just because it’s written in #python and usually it turns out that it’s because of developer oversight. In cases where Python is indeed a problem, I managed to solve most of my performance issues with caching, or simple code tweeks.

_alen,

@sentientmortal @folkerschamel @fell unfortunately not. I’m working on a tool that enables users to create directed graphs, that I later analyse and generate C code that runs on a custom hardware devices. Also, I wrote several parsers in and I managed to get satisfying peformance results. Surely, Python is not a synonym for performance, but luckily it can easily be combined with other languages to get a better performing code.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • megavids
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • JUstTest
  • All magazines