DEV Community

Pan Chasinga
Pan Chasinga

Posted on • Updated on

What are you hacking on this week?

I'm hacking almost exclusively in Erlang. It's a crazy language I visited a while back and ditched almost right away. Revisiting it after a year of FP feels like there's a lot I had missed.

Advantages I got right away from working with FP:

  • I appreciate ES6 and JavaScript's newer syntax.
  • I can't hack around and make code work out of the blue. You can end up doing that in an imperative language and your code will run without you knowing how. In languages like ML and Erlang you just can't.
  • I get to think in abstraction ... seeing the wood from the trees.
  • I never cease to get my mind blown over simple chop like this:
list_length([]) -> 0;
list_length([Head | Rest]) -> 1 + list_length(Rest).
Enter fullscreen mode Exit fullscreen mode

versus this

def list_length(l):
    counter = 0
    for m in l:
        counter += 1

    return counter
Enter fullscreen mode Exit fullscreen mode

The point is I get to realize that setting a counter variable and adding to it like how we first learned counting fingers as a child isn't the only way. (remember the situations in which you ran out of fingers to count or just plain forgot where you were at and your friend kept counting? That's hilarious, but those things actually cause most of the bugs we pull our hair on decades later).

Top comments (11)

Collapse
 
dahlitzf profile image
Florian Dahlitz

I'm focussing this week on finishing my personal portfolio page, which I'm creating using Python's Flask framework. I already integrated my Medium articles inside of my blog (automatically via Medium's RSS feed) and added GitHub facts at the bottom of the landing page.
github.com/DahlitzFlorian/python-p...

Besides that major project I'm doing first attempts of creating GUIs using Python's Tkinter.

Collapse
 
pancy profile image
Pan Chasinga

Flask is a joy to work with! What do you use for your personal blog?

Collapse
 
dahlitzf profile image
Florian Dahlitz

The blog is integrated in my portfolio. I took a CSS template including blog and portfolio. I didn't want to spend so much time on the blog stuff, so I make a requests against Mediums RSS feed and get my latest blog posts from there. Then I iterate over it and display, whereas the blog entry itself is a link to the Medium article. Medium has everything you need, so I keep blogging there and just display it in my blog. See my latest article for further information and some pictures of the result: medium.com/coding-experiences/13-w...

Thread Thread
 
pancy profile image
Pan Chasinga

That's interesting technique! I always wanted to atomically post on Medium and published everywhere. Wonder of DEV will soon support this.

Collapse
 
matteojoliveau profile image
Matteo Joliveau

I'm rewriting my repeatable project scaffolder from Golang to Python (much easier to dynamically load plugins in Python)

It's something I really care about because I'm lazy and being able to describe my project in a simple YAML file (defining License, Readme entries, folder structure, initializing git etc) and having my project set up with a single command is a must for me ^

Collapse
 
pancy profile image
Pan Chasinga

I guess convention over configuration doesn't work for you ;P

Collapse
 
matteojoliveau profile image
Matteo Joliveau

I'm an avid Spring Boot user, I'm all about CoC ahah.
But for stuff like project scaffolding I want the finest grain of control.

Collapse
 
jvarness profile image
Jake Varness

React'ing and Redux'ing. Still not sure if I'm doing it right:

github.com/jvarness/react-hello

Collapse
 
pancy profile image
Pan Chasinga

I have worked with Elm. Then when I got into React, I found Redux really complicate because it's hard not to compare to Elm.

Collapse
 
jvarness profile image
Jake Varness

I have written Elm before, and I drew a LOT of comparisons between Elm's core libraries and React+Redux. While I enjoy using React+Redux and Angular 4, there exists a certain elegance and simplicity that Elm offers that the other two options don't.

That, and the benchmarks speak for themselves. Compiled Elm code outperforms Angular and React.

Thread Thread
 
pancy profile image
Pan Chasinga

It's a shame Elm isn't in JavaScript. It couldn't have been. Most elegance that comes with Elm goes out the window without algebraic data type and immutable values (one could argue using Flow, Typescript, Immutable.js, and Redux but they're all just hacks to make JavaScript what it isn't).