drinkcocacola
|
6 months ago
|
on: Tell HN: I kinda want to go back to Java
Java is an amazing language, but about 4 years ago I moved to Kotlin (back-end): It has all the powerful Java features but it is way simpler to write and also nullability is embedded in the language (no more @NonNull @NotNull Optional<T> stuff).
You might find a balance: the power of the JVM and its ecosystem that you can access through a beautiful language that is Kotlin.
drinkcocacola
|
7 months ago
|
on: Show HN: FilterQL – A tiny query language for filtering structured data
I see a mismatch between the library API `filter` vs the supported operator `| SORT rating desc"`. You could use the API to your advantage by separating concerns: add a new `.sort("fieldName")` method.
```
const recentGoodMovies =
filterql
.filter(movies, "year >= 2008")
.sort("rating")
.desc()
```
If adding helper methods for semantics and clarity is not the intent of the library, then I'd rename the `filter` method since it doesn't communicate the intention clearly.
The function executes a full pipeline filter expression + `|` operations like `SORT` and `LIMIT` (not just a predicate filter). So for instance naming it to `query` will match your README terminology and grammar (`query := filter | operation*`)
drinkcocacola
|
1 year ago
|
on: Null-Restricted and Nullable Types
It is indeed annoying. For Kotlin, its advantage is that it had the nullability concept from its inception. For Java, they need to make sure previous code behaviour does not change, meaning that they need to add an additional marker to the explicitly mark "not null" types.
Probably in some years from now once codebases exclusively use this feature, there would be a way to tell the compiler that the default type (without marker) it is a non-nullable type.
drinkcocacola
|
3 years ago
|
on: Ask HN: What made programming finally click for you?
The first thing they taught me in programming in uni was: "Divide and conquer". It took me some time to truly understand what that meant in terms of programming. I remember that when starting a software project, I always started to feel very anxious if I was unable to picture the WHOLE program in my head; after some time I understood that by dividing it into smaller problems, and solving each one of them one at the time (without thinking at all in the other parts), things will eventually be connected and work, like magic.
By truly adopting this basic paradigm you start to think naturally about interfaces to connect these smaller parts of your program, and from there things just flow.
drinkcocacola
|
3 years ago
|
on: Ask HN: What are some cool but obscure data structures you know about?
I used to work for a mobile analytics company, and HLL made things SO much easier and fast that at the time we changed all our queries to be based on HLL. At the time, the ability of being able to sum uniques was like black magic, and still to this day I am quite impressed about HyperLogLog.
drinkcocacola
|
5 years ago
|
on: Show HN: I made a 5-key keyboard
I'll strongly suggest changing the approach from character input to phonetic input like the stenotype machines.
Creating a nice set of rules prioritising writing speed is of course no easy task, however I think it is the only viable way in my opinion to make it usable.
https://www.youtube.com/watch?v=S5Hmktf9ZlY
drinkcocacola
|
5 years ago
|
on: The Latino Programming Language
I also feel this effort is completely pointless. Java for instance has 52 reserved words. 52!!! the complexity of programming does not lie in the meaning of just 52 english words. That's actually the easiest part. As you get better you eventually will pick a production-ready language such as JavaScript or Kotlin, only to realise that you now have to learn the meaning of the words...
drinkcocacola
|
5 years ago
|
on: Epic Games steps up Apple fight with EU antitrust complaint
If I were a mobile phone manufacturing company, I won't call 30% of European market a "tiny portion".
drinkcocacola
|
5 years ago
|
on: India accounts for 11 per cent of global death in road accidents: World Bank
drinkcocacola
|
5 years ago
|
on: React created roadblocks in our enterprise app
Absolutely. Think about iOS or Android (native) development. Sure, the ecosystem is quite big, however you do not have the level of flexibility that the web has. You are limited not only in terms of languages, but also certain architectural decisions are bounded by the limits imposed by Framework (the Android or iOS SDK), so there are many decisions that _are already taken_, and for better or worse you have to live with it.
That is probably what I hate the most of front-end development compared with back-end or Mobile. There are too many options, and that certainly does not promote consistency within the project.
drinkcocacola
|
5 years ago
|
on: Intel outsources Core i3 to TSMC's 5nm process
Risk. Outsourcing all the manufacturing process has several a lot of uncertainty that they need to start figuring out. By the time they decide to manufacture their flagship chips, all the uncertainty will be already in the past lowering a lot the risk. It is better to screw it up with low-end, cheaper chips, than with the ones that represents the brand (high-end)
drinkcocacola
|
5 years ago
|
on: Ecosia – A search engine that plants trees
Absolutely agree. @bbobgravity is trying to create a sort of heuristic rule that simply does not work.
drinkcocacola
|
5 years ago
|
on: Show HN: After 10 years my side project has hit $8k/mo in revenue
I usually use mailinator.com for this purpose. In the past I found other similar services through Google search, but certainly didn't find yours. Probably working on your website SEO will increase your organic sign-ups.
One thing I love about Mailinator is that all inboxes are public, this completely removes the overhead of creating a new email even in a disposable email service like yours. So probably something you may check for your product. Congrats for the achievement!
drinkcocacola
|
5 years ago
|
on: Ask HN: I'm quitting my job, will create a game – any advice?
Absolutely, I know my odds of failing are above 95% but also know that the odds of learning and having fun is 100%
drinkcocacola
|
5 years ago
|
on: Ask HN: What do you keep learning and forgetting about?
drinkcocacola
|
5 years ago
|
on: Show HN: UnnaturalScrollWheels – Better scroll wheel settings for macOS
"Moving the camera" vs "Dragging the document"
Many years ago, when I was teachin my mother how to use the computer, I noticed something that I recalled the day Apple introduced the "Natural" Scroll thing.
She was working on a Word document, so I told her that she didn't need to click the scroll bar, but to scroll directly using the mouse wheel. To my surprise, she moved the wheel in the "wrong" direction. And for some seconds she was wondering why the whole thing was "inverted". In that moment I thought that probably we were all taught "incorrectly", and maybe, just maybe, "intuitively" people will think about scrolling on the opposite way, but we ended up learning that it was not correct, adapting our minds to the already established behavior of the mouse wheel.
The truth is. I embraced with happiness the "Natural" scrolling from Apple with the touchpad and the magic mouse on macOS, but also had a hard time getting used to this behavior with a regular mouse. I've been struggling since then, and I still use the "classic" scrolling with my Windows-based PC.
drinkcocacola
|
5 years ago
|
on: Show HN: An Aesthetically Pleasing Arch Linux Distro
The attention to detail is so high that the screenshots in the website are not even proportionally scaled. Just no.
drinkcocacola
|
5 years ago
|
on: I bought netflix.soy
My mom is unable to pronounce "Netflix" correctly (Spanish is her mother language), she always said something like "nesflis". So yeah, years ago I bought nesflis.com for her.
drinkcocacola
|
5 years ago
|
on: Coronavirus fatality rate could be as low as 0.26%, CDC says
Well, I've been following numbers for the last two months in different countries from different sources. My initial best estimations were that the fatality rate was about 0.77% given the numbers in South Korea (high number of tests). Other countries such Spain were reporting rates of about 10%, however testing was quite low in comparison.
Recently Spain did a seroprevalence test (number of people with antibodies for Coronavirus) with a large sample of people. They found that 5% of the population had antibodies (2.4M people). Which means that the fatality rate is actually about 1.1% and not 10%.
This numbers (from 0.77% to 1.16%) have been constant in different countries, so let me express my disbelief with the numbers published by the CDC.
drinkcocacola
|
6 years ago
|
on: Ask HN: Which browser is your default, and why?
Safari because the integration with iCloud Keychain, Apple Pay, and its ability to show videos "Picture in Picture" in the Mac from sites such as YouTube.
At work I use also Safari, but 40% of the time I use Chrome because the Safari dev tools are kind of limited IMHO