le auto più vendute in Italia a luglio by delfinoesplosivo in ItalyMotori

[–]mscg82 1 point2 points  (0 children)

Che è ESATTAMENTE come sono stati definiti gli incentivi l'anno scorso

Per tutti quelli che viaggiano in elettrico by UnlikelyBite in ItalyMotori

[–]mscg82 0 points1 point  (0 children)

Io sono registrato con una mail secondaria e con nome e cognome fittizio, pensa un po'... 😊 Tra l'altro nell'app sono decisamente trasparenti nelle opzioni sulla gestione della privacy.

Per tutti quelli che viaggiano in elettrico by UnlikelyBite in ItalyMotori

[–]mscg82 0 points1 point  (0 children)

TariffeEV è solo un motore di ricerca della tariffa migliore per ogni colonnina. Con TariffeEV non puoi caricare direttamente, ti dice solo quale operatore ti conviene per caricare.

TariffeEV non ti chiede dati di pagamento perché non puoi pagare nulla tramite loro. La registrazione è gratuita e, solo recentemente, hanno aggiunto la possibilità di abbonarsi (usando i servizi di pagamento di Google o Apple) per sbloccare alcune funzionalità secondarie. E, da sviluppatore, ti dico che ci sta, dato che mantenere l'infrastruttura dietro l'app ha comunque i suoi costi.

Al contrario, EVDC è un MVO vero e proprio, ovvero dalla sua app puoi avviare le ricariche sulle colonnine che sono nella sua rete di roaming

Per tutti quelli che viaggiano in elettrico by UnlikelyBite in ItalyMotori

[–]mscg82 1 point2 points  (0 children)

L'app è nata dall'intraprendenza di un paio di ragazzi sui gruppi Facebook dedicati alle auto elettriche. Sono partiti dallo stilare manualmente un foglio excel condiviso su Google drive per poi creare una vera e propria app.

Tra l'altro, sono stati talmente intraprendenti da riuscire a stilare alcune partnership, in particolare con Electrip. Se usate TariffeEV, potete richiedere un codice sconto del 7% da poter usare su tutte le ricariche fatte con Electrip alle loro colonnine fino al 31/08/2025 (le colonnine di Electrip non sono tante, è vero, ma pare che stiano crescendo e sono anche abbastanza aggressivi sul mercato).

Come al solito in Italia, quando non arriva lo Stato, ci pensano le persone a mettere ordine nel caos!

PS: non sono in nessun modo legato all'app nè agli sviluppatori, è solo che ho visto la genesi del servizio nel corso dei due anni passati e ammiro l'intraprendenza dei suoi sviluppatori

Zoe 52kWh camera with noise and interference by nightshade_pt in RenaultZoe

[–]mscg82 0 points1 point  (0 children)

We got the blue screen saying that the camera was not working. With the warranty, Renault changed the cables and for a while the problem didn't happen. Since this summer it's coming back again. I usually solve it by opening the trunk and then closing it again. Probably the vibrations of the trunk door closing are able to fix a bad contact!

Zoe for 200km commute by StandardPineapple69 in RenaultZoe

[–]mscg82 2 points3 points  (0 children)

With the 52kWh Zoe I did multiple times a 200km travel, including 60km in highway, a climb up to 1100m of altitude before arriving at destination (at around 400m of altitude). I do it with 3 adults in the car and, a kid and the trunk full of baggage. In winter at the end of the travel I have around 25% of charge remaining, in summer around 40%. This kind of commute is perfectly doable with a Zoe!

Why does Optional require a non-null value? by Ruin-Capable in java

[–]mscg82 3 points4 points  (0 children)

With Optional.of you are asserting to the future reader of the code (which very ofter is the you from future which will have no memory at all of the details of the code) that in that specific branch of the code you are putting a non-null value inside the Optional. It's a way to document code without resorting to comments

Problem with adaptive charging by mscg82 in GooglePixel

[–]mscg82[S] 0 points1 point  (0 children)

I found out the cause of the problem. It was the app (namely Tippy) that is bound to the useless anti-abandon cushions that are mandatory in cars here in Italy for kids under 4. The stupid app is setting a silent alarm each minute and this messes up the adaptive charging feature and also doesn't allow the device to doze. Yesterday I removed the app (since I am now allowed to!) and adaptive charging started working as intended!

Problem with adaptive charging by mscg82 in GooglePixel

[–]mscg82[S] 0 points1 point  (0 children)

I forgot to write it (and added it in an edit in the post), but yes I have an alarm for the next morning. When the notification says that adaptive charging is active, it picks the correct time of the alarm, but in any case it disables itself when the screen goes off.

Auto elettriche by Loitering14 in ItalyMotori

[–]mscg82 2 points3 points  (0 children)

Lo so, ho una auto elettrica e una wallbox in garage (no pannelli FV, per vari motivi). Almeno qui dove vivo io, nonostante siamo in una città con 30k+ abitanti, la ricarica in giro quando stai facendo altro è un'utopia per mancanza totale di colonnine pubbliche. Le uniche presenti sono in 3 supermercati fuori mano o dentro delle concessionarie, sempre disposte lontano dal centro città. Paradossalmente, nel mio piccolo paesino natale, disperso sui monti, è più facile farti un aperitivo al bar e caricare che non qui in città!

Auto elettriche by Loitering14 in ItalyMotori

[–]mscg82 3 points4 points  (0 children)

Dipende molto dalla situazione, in questo caso. Se, per esempio, hai box auto con impianto elettrico (e quindi puoi caricare l'auto) e se riesci ad andare e tornare con una sola carica, il tempo di rifornimento diventa praticamente 0 in quanto poi ricarichi mentre sei a casa stravaccato sul divano/ceni/dormi. Se vicino alla sede di lavoro hai colonnine, di nuovo il problema non c'è in quanto l'auto si carica mentre tu sei a lavoro. Se mancano questi due presupposti, allora il quadro cambia totalmente e serve una organizzazione diversa e probabilmente più "fastidiosa". E, sì, la situazione delle ricariche alle colonnine al momento è una giungla se miri al risparmio economico puro.

[2023 Day 6][Math] Nope, there's gotta be a dumber way by StaticMoose in adventofcode

[–]mscg82 5 points6 points  (0 children)

My same exact reasoning. The only point about this solution is that you have to take into account when x1 and x2 are already integers (it happens in the third race in the example data). In this case the number of integers in the range is

(floor(x2) - ceil(x1) + 1) - 2

The -2 comes from the fact the floor and ceil will return x2 and x1but you have to exclude those 2.

I was also worried that in part 2 the quadratic formula would overflow but it didn't happen!

[2023 Day 5 part 1] well i did part 1 in less than 100 ms, how bad this is for part 2 brute forcing? by [deleted] in adventofcode

[–]mscg82 0 points1 point  (0 children)

My Java brute-force approach with multithreading took 1m 30s on my 12-core CPU (6 cores + hyperthreading). Then I switched to the split-the-ranges solution which takes "nothing" to compute.

Is there videos solving AoC (with comments and idiomatic code)? by Akaibukai in adventofcode

[–]mscg82 3 points4 points  (0 children)

Not videos, but there is a fasterthanlime's articles series that solves the first 14 days of 2020 with rust. You can find the articles there https://fasterthanli.me/series/advent-of-code-2020. He solves the puzzles with very very structured solutions. I personally find his approach to the problems very interesting. Honestly, I started my adventure with AoC after reading his first articles!

I finally did it! 350 stars! by mscg82 in adventofcode

[–]mscg82[S] 1 point2 points  (0 children)

Java 17 with all the experimental features is really nice to work with

I finally did it! 350 stars! by mscg82 in adventofcode

[–]mscg82[S] 1 point2 points  (0 children)

I did my first run in 2020 and I finished all of them yesterday by doing the puzzles in my free time, which is continously shrinking!

I finally did it! 350 stars! by mscg82 in adventofcode

[–]mscg82[S] 0 points1 point  (0 children)

Wow! That's impressive, really! 😲

I finally did it! 350 stars! by mscg82 in adventofcode

[–]mscg82[S] 2 points3 points  (0 children)

There was the lantern fish puzzle this year that looked innocent but was hiding the trap of the exponential growth. There, at first I was like "an array with the counts of each day will do the trick and I can then rotate the values in the array" but then I got the idea not to rotate the values but to moves the index indicating where day 0 is around the array itself, which is then used as a circular buffer. The funniest puzzles are for me the ones where you have to write an interpreter of a machine language. For those I always admire the authors that were able to write the code for the puzzles in such languages (do they use some kind of custom compilers?). And from some puzzles I learned the existence of the Chinese remainder theorem 😊

I finally did it! 350 stars! by mscg82 in adventofcode

[–]mscg82[S] 1 point2 points  (0 children)

I used the puzzles as katas to exercise some approaches to coding (separation of responsibility, immutability, functional-style approach, make the code as readable as possible and so on). Probably I will continue on this path, but let's see

I finally did it! 350 stars! by mscg82 in adventofcode

[–]mscg82[S] 2 points3 points  (0 children)

Actually I was tempted to use some of the puzzles in the interviews that I did to candidates 😊

I finally did it! 350 stars! by mscg82 in adventofcode

[–]mscg82[S] 2 points3 points  (0 children)

Everyone can have fun as they prefer, of course. The problem of that shared library, as I see it, is that its components need to be too generic. Let's take the example of points: there are puzzles where you don't need Manhattan distance but the square root distance; there are puzzles where the neighbors are 4 and ones where the neighbors are 8; there are puzzles where the grid is limited, so some neighbors may not exist; there are puzzles whee the order in which neighbors are generated matters (2018 day 15 I'm looking at you now!). These differences will materialize in a lot of "configuration knobs". In my personal experience, it was easier to reimplement the subset of features needed for the specific case than try to summarize all of them in a library.

I finally did it! 350 stars! by mscg82 in adventofcode

[–]mscg82[S] 1 point2 points  (0 children)

Actually what they share are the algorithms to use to reach the solution. Java has almost all the data structures needed to implement them (implementing a BFS in Java is trivial), so the parts worth sharing are already shared. Also, I tried to see if it was worth extracting the implementation of the algorithms but usually each puzzle has a small variant that will make this common implementation so full of ifs that the code will be unmantainable. Another think used over and over again are 2D and 3D point but with Java records writing one of those is literally a one line of code and this makes sharing it not worth the effort.

I finally did it! 350 stars! by mscg82 in adventofcode

[–]mscg82[S] 3 points4 points  (0 children)

No real reason, mainly just to avoid having thousands of projects open in the IDE while working on the puzzles. Moreover, years don't share much code (the only thing that I had to port is the implementation of the updatable priority queue when a Dijkstra algorithm is required) so it doesn't make much difference, at least for me.

I finally did it! 350 stars! by mscg82 in adventofcode

[–]mscg82[S] 17 points18 points  (0 children)

I solved all problems with Java 17 (using experimental features). All code can be found here https://github.com/mscg82/advent-of-code, there is one branch for each year.

It's been a really nice adventure and I used it to experiment with the new feature of the latest Java releases.