HN user

flaie

221 karma
Posts9
Comments114
View on HN

Currently almost all of my side projects, LLM assisted or not, are coded in Go + HTMX.

Opus and GPT are very good at it, it's fast to build and start, convenient to deploy and host, one binary. I like it very much.

Very good stack to iterate fast.

Good article.

Maybe you could look up the Try monad API (Scala or Vavr works in Java + Kotlin), by using some extra helper methods you can have something probably a little bit lighter to use.

I believe your example would look like the following with the Try monad (in Java):

  public UserDTO register(UserRegistrationRequest registrationRequest) {
    return Try.of(() -> authService.userExists(registrationRequest.email))
      .filter(Objects::isNull, () -> badRequest("user already exists"))
      .map(userId -> authService.register(registrationRequest.email, registrationRequest.password))
      .get();
  }
The login() function would be using the same pattern to call authService.verify() then filtering nonNull and signing the JWT, so it would be the same pattern for both.

I have been solving these since years, I find it a nice way of assessing a language and deep dive since it will cover lot of parts of what makes a language.

I have been porting my old solutions in other languages into Kotlin over the time, and will be again doing them in Kotlin. I find it a nice language for AOC since custom extensions and DSL possibilities, it has a good builtin libraries and you can always fallback on Java, even if it has some shortcomings.

Regarding the AOC per se, I take it as a fun daily challenge, I know I won't be able to be part of the top 100, at least I would with some luck during the first 3 days, and then.. nope, that's life, try not to be too competitive. Last year it took me 8 hours to solve day 20, but it's a game, you should have fun doing it (I had), if not people should stop.

However, I strive in trying to write pretty, compact, idiomatic and as functional as possible code, which means that sometimes I will write an ugly solution in 5 minutes, and will take an hour to make it beautiful.

Besides I like to read the story, I know plenty of friends who don't even read the adventures of Santa, they just solve the puzzle and that's it, they don't even know they saved Christmas :-D !

Good reading! I did learn a lot regarding tools I didn't knew and I will definitely check Reedsy and Scrivener, I did use leanpub which was really good, doing almost everything for me.

The hardest part is about marketing for me, and I am happy that I first wrote the book for me and see the completion as an achievement, I talked with a lot of people who thought it was kind of easy to get rich just writing books, I don't think so, not easily.

Also, it's really tough to promote a book without feeling like you're over-trying to do it, and regarding an IT book, except for a reddit community, or twitter I wouldn't know where to start.

I have even been invited to online conferences, people seemed to be interested (don't think they were faking it), but it generated zero sales :)

This is a good article!

For me, the best way is just to start writing it. I've written a book about a Java library last year named "Practical Vavr" [1], I had the idea since some weeks/months and with the COVID situation having time at home, just told to myself now is the time.

Didn't thought a lot about anything, except for how the book should be laid out, I thought the process was interesting so I went full on it, discovered leanpub and other websites that makes the process easy as just writing some Markdown.

I think that the hardest thing is the marketing around the book, how to tell the world you wrote it and why they should be interested in reading it (and buying it). I just posted it here and there on the web (reddit, twitter mainly), didn't made a lot of fuss about it, I don't know how anyway.

In the end it was more about the experience of writing one and finishing it, than making big money (even if I was able to reach almost 100 people totally unknown people who were kind enough to trust that the content would be good and buy it).

[1] https://leanpub.com/practical-vavr

26 Years of Delphi 5 years ago

I remember when I discovered Delphi, it was in circa 2001-2002.

At the time I was 16-17 and knew how to program with PHP (I was modding phpBB at the time), tried with PHP-GTK to build user interfaces, but found it not that great.

Then I discovered Delphi, already knew some parts of Pascal. But what a gem it was, in a matter of days I felt like I was totally proficient, could create windows, manage resize, add components, tweak colors, run background tasks, want a listview? just drag it. Need a HTTP call? drag the component (can't remember the name), connect onclick to it, and you're done. I recall the website torry.net with plenty of libraries to download.

I also tried Borland C++, but wasn't good enough with it, and as I remember discovering that even DevC++ was written with Delphi. Simply figuring out it was good enough for me.

I created so much things with it until like 2004-2005 I think, like a complete terminal on my Windows, re implementing standard commands all within Delphi. Wrote some games companion for Rainbow Six and RavenShield [1], fetching statistics and available servers, scanning games to find your friends, downloaded thousand times. An alt-tab which worked with Quake III that at the time was also downloaded hundreds of times, a companion to The All Seeing Eye (server browsing), a small Photoshop tool where I learnt how to create my own filters like Gaussian blurs and so on [2], key mapping profiles for plenty of games by modifying INI files [3], a code formatter inside DevC++ [4], ...

I have lost all of my source code (didn't knew how to backup things at the time), still have some binaries and screenshots for posterity

I remember this period with nostalgia and great passion.

Thank you Delphi for the good times and all the fun, this is when I really knew what I wanted to do after school.

[1] https://rehost.diberie.com/Uploads/37/20210215-160435-948cd7... [2] https://rehost.diberie.com/Uploads/37/20210215-160351-cc03e0... [3] https://rehost.diberie.com/Uploads/37/20210215-160401-712b1f... [4] https://rehost.diberie.com/Uploads/37/20210215-160338-6f856c... && https://rehost.diberie.com/Uploads/37/20210215-160330-cc512a...

Hey everyone,

I've been teaching Java & Vavr to many developers at work over the years, and then decided to write a book about it since many had the same questions and problem using it efficiently.

Vavr let you craft robust and elegant Java code, and my book help people put it in practice.

It's published here: https://leanpub.com/practical-vavr, besides since it's an ebook, I can update with feedbacks (if any).

I had the pleasure to have Daniel Dietrich (the creator of Vavr) read it before publishing.

Anyway, if someone's interested, I'd be glad to answer questions :)

I can also answer about leanpub, since it made it very practical for me as a developer, to make a book from just a set of markdown files.

Hey everyone,

I've been teaching Java & Vavr to many developers at work over the years, and then decided to write a book about it since many had the same questions and problem using it efficiently.

Vavr let you craft robust and elegant Java code, and my book help people put it in practice.

It's published here: https://leanpub.com/practical-vavr, besides since it's an ebook, I can update with feedbacks (if any).

I had the pleasure to have Daniel Dietrich (the creator of Vavr) read it before publishing.

Anyway, if someone's interested, I'd be glad to answer questions :)

I can also answer about leanpub, since it made it very practical for me as a developer, to make a book from just a set of markdown files.

I have both a MacBook Pro and a standard PC running Windows, and yes on Windows I run Clojure both on Windows and inside WSL, both IntelliJ and VSCode works pretty well with WSL there's really no problem running it.

I'm doing a lot of Clojure since years both on my MBP and on Windows and there's no problem at all doing that way. Besides VSCode even has a plugin for WSL which will let you directly hook into it.

So yeah there are some questions like which Java to install, which IDE, .. but these questions are the same for other programming languages.

If you have any hint regarding how to improve my guide don't hesitate to tell me if something is not clear in it :)

It was a goal of mine to have up to date knowledge in it, latest deps and so on. I would be glad to write something else on writing web-apps with Clojure.

Thank you for your great feedback, I've added a clojure koans to the list of resources at the end of the guide and keep on learning and building Jean-Michels :) !

Author here:

I recently gave a talk at work to show why Clojure is a good fit and show some of the possibilities and its ecosystem.

People got interested and wanted to try stuff but were overwhelmed with what to choose (lein, deps, boot) which editor to use, what's a REPL, why should I use one, how to use it (from the IDE) and some other stuff like where to learn Clojure.

So I decided to write an introduction regarding all that (covering IntelliJ & VSCode since it's the tooling people use at work). Don't hesitate to give feedback as this surely can be improved.

Note: it doesn't cover ClojureScript but I would be glad to cover it in the same manner in another post.

Author here, thank you for the comment, you're right in the latest code I replaced it with clojure.data.csv but for the article I kept it that way to show that you don't need dependencies for such little utilities, split, map and zipmap and we're done.

I've worked in three different banks and was able to bring my laptop (not connected to the bank network of course), use my headphones to cut the open space noise and listen to anything I want.

As in your bank, proxy was very restrictive, a lot of the web wasn't reachable, but with my laptop when I had free time between projects or issues I could use them for something interesting, and management/security was OK with that.

Seems like hell, just get out of there if you can and have the chance to. In the meantime try to ask for other tasks, or try to refactor some code, there's always room for improvement somewhere, and it's better than looking at the clock for hours a day.

Good luck!

RN has been such a big boost of productivity for us, it changed everything. We were able to onboard junior developers that are excited to work with it as well as keeping our at the time existing native developers enthusiast about it (they embraced it since), and the time to market for us have dramatically improved for new features on both iOS and Android.

Of course some stuff sometimes doesn't work well, react-native link versus Pods, native modules or various SDK integration, navigation is sometimes tedious to work with but it is worth it really.

I don't regret at all the choice of migrating our app to RN one year and a half ago.

Well, when you've been hearing stories about Googlers for 10 years, you don't imagine that you need "discipline" being a Googler to buy a house.

I may be a little bit naive, but when my friend talked me about it I thought he was going to announce something like 200K or more, because these are the stories we always hear around here.

In the end he decided to not go because he already made the same amount of money and didn't want to move his family to Paris just for two hundred bucks a month. But I don't know anything about bonuses and 10% raises everywhere, or at least he did not tell me.

I'm surprised, is the salary that much bigger for FAANG in the USA? I know someone who's been approached by Google for a position in Paris, and the salary is not that great (around 110K€/year from what I heard for a Software Engineer position (more than 10 years of XP)). With that kind of salary, you can live well but you're not going to reach financial independence nor buying a house by the time you're 35/40.

I do know a lot of people making this or even much and they're not working at Google.

Exactly, there's a lot of cool stuff going on in Paris, but seriously it's underpaid for the price you have to pay to live there.

From where I live I could work in Paris with the same commute time than I do by working in Luxembourg, but I get a better paycheck.

Renting a 2 bedroom costs 700€ a month where I live, in Paris it would cost 2 to 3 times this.

I don't get the "there's not enough engineering available", this is just not true, reality is that people will earn a lot more in London, Luxembourg, Switzerland, so they chose that.