rednafi

@rednafi@fosstodon.org

Software carpenter with a focus on backend technologies, networking, I/O, databases, and data science. Rant & write on software at https://rednafi.com

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

rednafi, to python

My team at Wolt is looking for a staff+ engineer proficient in either or .

The position is fully remote as long as you live in or willing to relocate to Stockholm, Berlin, or Helsinki. If you know someone who might be a great fit, I’d love to have a chat.

https://careers-wolt-com.translate.goog/ja/jobs/staff-backend-engineer-(node.js-or-python)/2ea1b8d?_x_tr_sl=ja&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=sc&_x_tr_hist=true

rednafi, to golang

Had fun reading up about old school CGI scripts, setting one up with Apache server, and then writing a quick TIL on how to write a vanilla HTTP server in that runs a bash script to serve dynamic content on each request.

https://rednafi.com/go/reminiscing_cgi_scripts/

rednafi,

@coldclimate Ah, I've never written a real one since I came to the game way later. However, I had a ton of fun reading about it and implementing a basic one for the post.

Also, the lobser.rs discussion has been quite insightful:

https://lobste.rs/s/jcm2am/reminiscing_cgi_scripts

rednafi,

@paulox I wasn't, learned about all of these from othes :D

hynek, to random
@hynek@mastodon.social avatar

Loving this concept of “unearned knowledge” leading to “reckless confidence”. In tech that would be conference-driven infrastructure with the premiere example being Kubernetes.

rednafi,

@hynek People love applying Netflix solutions to their 10 user apps and making a mess out of it. At least then they can yell on twitter saying “microservice bad”.

rednafi,

@tintvrtkovic @hynek

During the bootstrapping period of any app or startup, the primary focus should be the product; not the infra.

Even in larger corps, engineers often get lost behind the technical minutiae of infra and lose track of the bigger picture. The result is that the business logic gets neglected.

I wrote a small piece on this dilemma which hit the front page of the orange site last week:

https://news.ycombinator.com/item?id=38159363

preslavrachev, to django
@preslavrachev@mastodon.social avatar

I’ve known about for 15 years.

I’ve recommended it to others.

I’ve worked w teams that used it.

I’ve clapped for people who have built great things with it.

And year, until very recently, I hadn’t really worked with Django in earnest. Excluding dynamic typing (which is a part of why moved over to ), everything else hits home on so many levels. Everything I’ve ever needed is in one place, and simply works!

I’ve loved this framework before, now, even more 🐍

rednafi,

@preslavrachev Diango simply works. Every time, I pick another language and try to build anything full-stack, I miss Django. That includes Go.

I love Go but it demands cobbling together a bunch of random tools to achieve result. Unlike Python, Go's niche is strictly networking . Whenever I walks outside that realm, I find myself spending a ton of time picking up bespoke tools and opposing the community that drags 'simplicity' to the extreme.

rednafi,

@halfbit_ @preslavrachev Brevity isn't the strongest suite of Go. But that's probably for the better.

Readability is preferable to writing ergonomics. The listcomp only feels easier to grok because you know the incantations.

I was mostly ranting about the third party tooling situation of Go, rather than the language itself. Go isn't perfect but it's a joy to work with.

rednafi, to random
rednafi,

@joel arigato, freund!

rednafi, to golang

Writing a TOTP client using the standard library. Had fun reading rfc-6238 & implementing it. I was able to generate a code and use that to log into my 2FA enable account.

https://rednafi.com/go/totp_client/

rednafi, to golang

Learned this neat trick to statically check interface conformity in at compile time. Turns out, this was always buried in the Effect Go text. Uber style guide also encourages to use it when you're exporting a type where the users need to implement certain methods as part of the API contract. I borrowed the name from Caddy docs.

https://rednafi.com/go/interface_guards/

rednafi,

@preslavrachev I have been in a few situations where I had to export a type where the users are expected to implement certain methods. In those cases, explicit interfaces can be handy. But yeah, this can be abused and Effective Go warns about that.

rednafi,

@preslavrachev @feedle Thanks much. Wasn't aware of @feedle before :D

rednafi, to python

TIL If you yield from the iter method on a class, you can loop over the instance multiple times, and will automatically call iter to produce a new generator on each pass. This is more convenient than calling a gen func multiple times.

https://rednafi.com/python/enable_repeatable_lazy_iterations/

rednafi,

@tartley Wouldn’t work since calling iter on the generator multiple times return the same generator itself.

def foo():  
 yield from range(10)

gen = foo()

for i in gen.__iter__():  
 print(i)

for i in gen.__iter__():  
 print(i) #prints nothing  
rednafi, to random

This is a neat formulation of some of the principles I tend to stick with while writing software. One thing I'd add to this is to start your design process with types and scaffold functions. The rest of the structure will shimmer in as you move along.

https://kevinmahoney.co.uk/articles/my-principles-for-building-software/

rednafi, to python

I've been meaning to publish this one for a while. It talks about an insidious type of inheritance that has somehow become the defacto design tool in the realm, is easy to spot but quite difficult to fix, and hurts readability as your code grows.

https://rednafi.com/python/escape_template_pattern/

rednafi,

@blong Yeah. Once you add a metaclass, all of your subsequent subclasses will get infected with the encumbrance of its internals that they probably don't care about. Thanks for reading 😀

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