HNHacker News
TopNewBestAskShowJobs

mablopoule

844 karma · joined February 24, 2021

Just a front-end developper. Based in Paris
submissionscomments
mablopoule··on Git rebase, what can go wrong
No yeah, absolutely do squash those commits, they are actually polluting the git history.

The issue for me is when commit who are about adding a new value in the env file become mixed with template and responsive handling, mixed potentially with a bug fix.

mablopoule··on Git rebase, what can go wrong
I agree with you in principle, but it's usually because of process and friction. In the place I'm working right now, that would result in days lost as I need to create a new Jira ticket, which obviously require a team meeting for grooming (because Agile!), and then going after colleagues so that the PR is accepted, which best case still need for CI/CD pipeline to finally deploy, and then merge it to the dev branch, and finally rebase the current feature branch... and all this multiple times.
mablopoule··on Git rebase, what can go wrong
Yes, but now it's mixed with the bathwater, and now morph into another metaphor as it become the needle in the haystack.

It's okay to have 'low information' commits one can easily ignore in your history, as long as the 'high information' ones stay readable and coherent.

mablopoule··on Git rebase, what can go wrong
Because now instead of having a line changed within a granular level of changes, it's lost with the other changes from the same feature branch, which is a more macro level. So if a change in config is needed for the feature, the part when this config change actually need to be handled, or would impact the data-flow is harder to evaluate now that you mix it with template changes, style changes, new interactions needed for the users, etc...

EDIT: On top of that, there's usually a bit of 'related' work you need for a task, by example when you find an edge case related to your feature, and now you also needed to fix a bug, or you did a bit of refactoring on a related service, or needed to change the data on a badly formatted JSON file.

Unbeknownst to you, you added a bug when refactoring the related service, a bug that is spotted a few months after, only on a very specific edge case. If the cause is not obvious, you might want to reach for git bisect, but that won't be very useful now that everything I've talked about is squashed into a single commit.

mablopoule··on Git rebase, what can go wrong
It's not about VCS, it's about code, both now and later, and context.

If you need to do a workaround, or a complicated feature sometime it's nice to explain it as a comment in the code, but sometime it's better to put it as a comment inside the commit message. But if it's all merged i the end, along with lots of template changes, README changes, refactor irrelevant to the current changes, then you're losing an important way of navigating a codebase.

mablopoule··on Git rebase, what can go wrong
I actually hate squash merge because of all the noise it adds. Sure, the commit graph looks nicer, but it come with a terrible loss of information when doing git blame.

I'm a big proponent of rebase and squash if it helps to make a commit more coherent, but we use squash merges by default in the current project I'm working on, and I die a little bit each time I try to understand what changes were related to a line when tracking down a bug.

mablopoule··on Mastering DOM manipulation with vanilla JavaScript
Another excellent resource in the same vein is the marvelous https://javascript.info/

As a front-end dev who actually like the fundamental platform and the capacities it offers, I'm both happy to see so much nice things coming our way (nested CSS, container queries, and a generally nicer JS experience since ES6) and at the same time horrified by the amount of people using components for trivial things like buttons or bold text.

And I do like framework, but so much framework and library's marketing depend on making people believe that CSS and vanilla DOM manipulation is insanely hard (it's not once you know the fundamentals), and that pulling a random package on NPM is not just quick and easy, but also the professional thing to do.

mablopoule··on Was Atlantis a Minoan Civilization on Santorini Island?
I sometime wonder if in the 25th century people will be searching for the exact location of Hogwarts from Harry Potter.

To be fair, Troy was also mostly thought to be mystical before Heinrich Schliemann went on a quest to find it (and subsequently destroyed most of it as he used explosives to perform archeological digs).

mablopoule··on Bibi-binary
Yes, and another reading on the pun not explained in the page, on top of 'bibi' meaning 'me', is that 'bibine' (present in the prononciation of 'bibinaire') is French slang for alcohol.
mablopoule··on How to (and how not to) design REST APIs
You might point out what "true REST" means based on the Fielding's paper, but at this point a "REST API" has a (somewhat) clear meaning derived from 2 decades of widespread usage to mean exactly what the author used it for.

I love etymology in general, but don't fall into the trap of thinking that the origin of a word or an expression is the only correct meaning.

mablopoule··on Silicon Valley doesn't understand the concept of fun
UGC ?
mablopoule··on Behold the Nebulous Smear: al-Sūfī's Illustrated Book of Fixed Stars (ca. 1430)
If you want to see it in a different context, I highly recommend the "Stellarium" App, it's super polished, and gives an option to switch to different "Sky culture"; Al-Sufi's being among the available choices, complete with drawings.
mablopoule··on I accidentally saved my company half a million dollars
On his book "The Secrets of Consulting", Gerald Weinberg advise against improving more than 10% of performance, and if so, of hoping to have any credit.

Just like the article, his reasoning is that if you improve performance too much, it makes management/the team look bad for not doing it before, while a smaller improvement in performance make management looks good.

mablopoule··on People are speaking with ChatGPT for hours,bringing 2013's Her closer to reality
Related, an article on HN [0] a few weeks ago about a disturbed young man who used an AI chat app, which encouraged him on his plans of killing the Queen or England.

[0] https://news.ycombinator.com/item?id=37811661

mablopoule··on The Moose Boulder Hoax
My favorite case of "geographical hoax" is Poyais, a fictional country in central america that a con artist named Gregor MacGregor invented for a scam in the early 19th century.

In an incredible act of chutzpah , he invented a whole country along a fictional city of St Joseph, serving as capital, he printed dollar notes from the "Bank of Poyais", forged geographical data, wrote book about it under a fake name.

His scam resulted in a stock market crash in 1825, and the death of at least 180 peoples out or 250 colonists who expected to settle in St Joseph, but instead arrived to Belize.

mablopoule··on Ask HN: Which non-fiction books had the biggest impact on you?
For posterity: by "given the current context", I hint at heightened tensions in middle-east due to Hamas attack & the current Israel bombing of Gaza.
mablopoule··on Show HN: Instant API – Build type-safe web APIs with JavaScript
I don't have an opinion about this particular project, but this just JSDoc, as mentioned in the readme: "Simply write a JSDoc-compliant comment block for a function that represents your API endpoint".

Yes, it's verbose, but its advantages over Typescript is that it work without any compilation step, while being standard enough to give helpful type-hint on any good enough IDE.

Of course, if your project uses Typescript already, you should use Typescript instead, but if you just want to do a simple web page without any compilation step/package.json shenanigan, it's sometime nice to reach for JSDoc.

EDIT: to answer your question, in JSDoc you can typedef your own custom objects[0], so you thankfully don't have to repeat your types everywhere.

[0] https://devhints.io/jsdoc

mablopoule··on California slams San Francisco for 'egregious' barriers to housing construction
Sorry to be flippant, but 250 years of building is not a long time at all, nor is it a relevant data point.
mablopoule··on Ask HN: Which non-fiction books had the biggest impact on you?
"The righteous mind" by Jonathan Haidt. I loved it so much that I gave it to three different peoples.

It's about psychological studies of morality, and what tends to influence one sense of morality.

It had a huge impact on me because I feel that it helped me grow as a person, and being able to understand other culture/other principle, even if I don't necessarily agree with that.

Lots of stuff that seems plain evil from a western point of view (ergo, centered about the morals of individuality) would look more sensible once understood from a moral coming from a sense of community, and the necessarily conservative need to foster a stable societal structure.

It doesn't mean that I agree with things like opposing the rights of woman to drive/open bank account, but it help understanding the motivation better.

Another interesting point he brings is the differentiation between a moral judgement (X is good or bad), and the moral reasoning (X is bad because of Y and Z). Notably, the moral judgement come before the moral reasoning, the latter being used not as a way to reach a conclusion, but as a way to defend a moral judgement with our peers.

Jonathan Haidt is mostly known for his works on the political polarization of the USA.

Another book I found incredibly enriching (but unfortunately only in French) is "Au coeur des services spéciaux", which is an interview by Jean Guisnel (a french investigative journalist) of Alain Chouet, a former director of the DGSE (the french CIA basically).

Alain Chouet studied Arabic and the arab/muslim world even before joining the DGSE, and what I picked up at the bookstore as a way to understand the french intelligence services turned out to be an extremely interesting (and respectful) exposé of the muslim and arab world, with the prism of political Islam, the history of terrorism as seen by french intelligence service, his opinion on many nuclear programs, and of course a great deal about 9/11.

The writing of the book is very fresh thanks to the conversational/interview style used, and while the book show its age more and more (it's from 2013), I still believe it's a worthwhile lecture if one is curious about such subject, especially given the current context.

mablopoule··on What is your “Orange Juice Test” question?
It's not supposed to test the other's loyalty, but if the other party is grounded to reality. It's potentially possible, but hard, time consuming, and thus expensive.

In the same spirit (but for another reason), the famous "Van Halen brown M&Ms clause" [1], which served as a proxy for how likely the venue also read & complied with the safety precautions for the concert.

[1] https://businessofsoftware.org/2013/08/the-truth-about-van-h...

mablopoule··on Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo
Will Will Smith smith ? Will Smith will smith.
mablopoule··on Ubuntu Desktop: charting a course for the future
For me, ArchLinux. It was more painful at first (worried about installing it the first time), but the other side of the coin is that I understand my system much, much better. ArchWiki is a jewel.

And yeah, it was because of Snap.

mablopoule··on Why Tailwind CSS Won
True, but the thing is that it wasn't really "complicated" CSS we used, but simply a good grasp on the fundamental of CSS, which is a overlooked part of web development.

I believe it's mostly due to the fact that CSS, just like SQL, is one of those technology approachable enough to fiddle with it and get somewhat far, while not really learning it, and thus overlooking the fundamentals.

> None of the frameworks I know of do that.

I would squarely put into this category all the CSS-in-JS frameworks, such as 'styled components'. Also everything that markets the 'cascading' part of CSS as being a mistake.

Also, all the frameworks that compiles CSS without generating the CSS sourcemaps, making the debugging experience way less efficient since all the applied CSS rules shows under '<style>' (eg: 'styled-components' again, who discarded it as being 'cosmetic' in the related Github issue).

mablopoule··on Why Tailwind CSS Won
I'm sadly not surprised to hear that, same for another poster who had the displeasure of working with a codebase with !important sprinkled everywhere.

Truth is I've been spoiled on that front because I had the luck to work for many year in a company where the CTO was a very talented dude who lived and breathed HTML/CSS since the mid-2000's, and who was quite thoughtful about that kind of stuff, so I had a first-hand experience of a good codebase, mostly by avoiding external dependencies, using the standard browser behavior, and frequently consulting the MDN.

This is why it's a bit disheartening to see so many front-end framework working against the plateform, even even marketing against it, while CSS and browser tooling his so much more enjoyable and powerful than before.

mablopoule··on Why Tailwind CSS Won
Except for the whole "Cascading" part.

I think I understand tailwind, but like the parent poster I'm really not a fan, because while CSS can be a footgun, it can also be quite clean when you use a sane DOM structure, CSS variables, and well thought out CSS selectors.

mablopoule··on Things you forgot (or never knew) because of React
Agree. I did CSS before flexbox was available, and I have no ideas how I did before. There is tons of very good stuff coming our way in CSS (such as container queries), better ergonomics for Javascript, excellent tooling in the browser, stuff to be optimistic for, not just all this madness about the framework du jour.
mablopoule··on Lessons From Linguistics: i18n Best Practices for Front-End Developers
Not op, but I think it stands for Proto-Indo-European language.
mablopoule··on Paris to bring back swimming in Seine after 100 years
"It's like the ocean, but cleaner"
mablopoule··on Hollywood movie aside, just how good a physicist was Oppenheimer?
Not OP, but I would recommend on this subject a podcast I've talked about in a previous comment [1], about the life or Hoover and the red scare in light of declassified knowledge of soviet spies in the US.

[1] https://news.ycombinator.com/item?id=36257604

mablopoule··on Tailwind and the Beauty of Ugly Code
Sorry for the rant incoming, but please no, for the love of God, no. Absolutely do not create a new component if it's just to abstract a CSS classe and a few HTML elements (unless you really really use it a lot).

I've been on a project like that, and the result was maddening: any page or component template would contain only references to other components and almost no plain HTML tag.

Each time you encountered something like a 'Title' or a 'Button' or a 'FooBarHeader' component, you didn't knew how much Javascript was executed behind each of those, or wether it had any side effects until you looked at the code (and sometime had nasty surprise on components used everywhere).

You also either had to look at its API or modify it to correctly use the web plateform (eg: how do I specify to my 'Button' is of type="button" or of type="submit" ? How do I add some aria attributes ? What if I want to add a 'data' attribute ?).

On top of that, the generated, runtime DOM would look nothing like the design-time template you are changing, which goes against the plateform, again.

And you also ended up with a huge 'components' surface, where this moderately complex (in term of essential complexity) had more than a hundred components, with some basic 'Button' component being monstruous 500+ lines of code under the hood (because of CSS-in-JS), all of it destroying the performance of the page.

On this particular project, I realized that the tag-to-component ratio was less than 1, even maybe closer to 0 than 1. In other words, behind each little <span> visible in the inspector, you had something like 3 to 5 component instances. I've called it "loosing your footing", as you couldn't touch any primitive, drowning in a sea of abstraction.

Somehow, I feel that it's more specific to the 'React' world which is a bit too trigger happy when it come to creating new component.

← PreviousPage 5 of 8Next →