I just completed "The Tyranny of the Rocket Equation" - Day 1 - Advent of Code
2019 https://adventofcode.com/2019/day/1 #AdventOfCode
December 2019
159 tweets
Anyone doing #AdventOfCode using @GiulioCanti
fp-ts (https://github.com/gcanti/fp-ts)?
Would love to use it as a learning exercise!
@RitzmannMarkus YAML is fine, as a compile
target. So any typed programming language is great, that outputs YAML as a
result.
@m4nl5r
@GiulioCanti Yeah, but what to do for simple
calculations? Like this one:
https://github.com/coderbyheart/adventofcode/blob/0ee6096a995e4f957974d29771bc322180a1bd98/moduleLaunchFuel.ts#L7
What is the fp-ts way to solve this?
@m4nl5r I am unsure, because I have seen very
little code using fp-ts what should be done and what shouldn't.
That's why I am trying to see more examples. Especially the other function is
also pure, but might be safer with a more functional aproach:
https://github.com/coderbyheart/adventofcode/blob/0ee6096a995e4f957974d29771bc322180a1bd98/moduleLaunchFuel.ts#L22-L33
@effemegna Thanks!
@effemegna
@m4nl5r Both of you used a recursive solution,
which has bitten me in the previous year on #AdventOfCode because that does not
work well with very large inputs.
I just completed "1202 Program Alarm" - Day 2 - Advent of Code 2019
https://adventofcode.com/2019/day/2 #AdventOfCode
In case you thought that summer tires are ok for driving in snow: #Trondheim 🇳🇴
@kotzendekrabbe Wir haben genug hier zum
Abgeben!
@kotzendekrabbe I'm gonna cycle through
this now:
Found another one: https://github.com/ruizb/adventofcode2019
Always!
I just completed "Crossed Wires" - Day 3 - Advent of Code 2019
https://adventofcode.com/2019/day/3 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/36e92a16ff733de8be7a526bcee247e35a88afdb/day3
@shrutikapoor08
@dan_abramov - it provides no improvement
over using REST
- it's only useful for graph-based data schemas
- all actions need to by synchronous
- one can just wrap a GraphQL API with a REST API
- every type needs exactly one resolver
@mattdavidson Let me know if something
could be clearer!
@chaos_monster
@kotzendekrabbe
@typescript I would, by I code #TypeScript
without interfaces.
Or Classes.
#inheritanceisalie
@lxztlr
@chaos_monster
@kotzendekrabbe
@typescript Yes, no new no this make for much
easier to understand code.
@pati_gallardo The web clients for Outlook
are suprisingly good.
@chaos_monster
@lxztlr
@kotzendekrabbe
@typescript I use JSON schema to validate,
since this is typically part of the documentation of the API.
And with JSON I want runtime validation, not just types.
The best approach IMO is io-ts, but not all devs like that.
@chaos_monster
@lxztlr
@kotzendekrabbe
@typescript You were talking about interfaces,
but I guess you want to generate runtime checks from them?
The problem is that TypeScripts type are too limited for that, so what are you
proposing?
@vicbergquist True story!
I just completed "Secure Container" - Day 4 - Advent of Code 2019 using
#TypeScript https://adventofcode.com/2019/day/4 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/cfeac34c9d1676fb7eed2de453e9aecf42aabb0e/day4
@Morl99 Thanks, I fixed the mix-up.
This week I am trying to implement the #bifravst #cloudnative SPA which allows
to manage an #iot cat tracker to @azure
(https://github.com/bifravst/bifravst/issues/29) and I am so deep down a
disheartening rabbit hole of broken things, that I need to keep track:
For authenticating API requests of user, Azure Active Directory is used. The
recommended way for a browser app
(https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-spa-overview)
is to use msal.js
(https://github.com/AzureAD/microsoft-authentication-library-for-js) which I
managed to set up in the React up ...
but it can't be used with the IoT SDK:
https://github.com/Azure/azure-sdk-for-js/issues/2556#issuecomment-497505818
So, I ripped it out again and added the authentication flow using
ms-rest-browserauth (https://github.com/Azure/ms-rest-browserauth) ...
Now I encountered a bug which enters the app in an endless redirect loop:
https://github.com/Azure/ms-rest-browserauth/issues/21
I tried to to reproduce this issue with the plain sample app, but the
dependencies won't install because they are hopelessly outdated
(https://github.com/Azure/ms-rest-browserauth/issues/22).
While trying to update the dependencies in the sample I encountered version
incompatibilities similar to this one:
while implementing the Node.js CLI for Bifravst I hit the issue that the latest
package individual relasese of packages from the azure-sdk-for-js are not
compatible, you need to now which versions to mix:
https://github.com/Azure/azure-sdk-for-js/issues/6361
All I want is a working, up to date example of a browser-based app that
interacts directly with the @azure IoT REST API. Ideally before Christmas.
@ichaos1985 Etabliertes System
false === isThisBetterToRead
https://twitter.com/emsuiko/status/1202272547045285888
@RalfDMueller
@ichaos1985 Das hört sich nach "fertig" an...
@RalfDMueller
@ichaos1985 Bestimmt nicht.
Software ist nie fertig:
💯👏 You can now "Reject any push that contains a merge commit by
enabling Require linear history"
https://twitter.com/GHchangelog/status/1202349131110535168
Here is why I love that:
https://github.com/coderbyheart/first-principles/issues/2#issue-355510790
I just completed "Sunny with a Chance of Asteroids" - Day 5 - Advent of Code
2019 using #TypeScript https://adventofcode.com/2019/day/5 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/78439fa3cc292bc0be33e08397ac36b4e4e516a5/day5
@TonyBologni I always rebase against the main
branch.
I sometimes squash into one commit, but in most cases I leave them as is (or do
some minor reorganization with rebase -i).
@TonyBologni Yes, force-with-lease will
reduce the times this might happen.
However, I recommend to use only personal branches.
Integration of work should happen in the main branch:
https://trunkbaseddevelopment.com/
I'm happy to report that @PrettierCode and
#typescript @geteslint do work now perfectly
with the new optional chaining and nullish coalescing operators!
#prettifyalltehthings
@Azure Inventor of #TypeScript, has broken typings:
https://github.com/Azure/azure-iot-sdk-node/pull/663
@EmmaWedekind It's good that you see a way
out of it. Wishing you a lot of strength to get through!
I just completed "Universal Orbit Map" - Day 6 - Advent of Code 2019 using
#TypeScript https://adventofcode.com/2019/day/6 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/be5224e4569926b9b26530ef1fb968c497c7ccf6/day6
Finally secured my tickets today, for the additional show!
@pati_gallardo On the web UI click the
dropdown of a reply to one of your posts...
@LaszloWa Yeah! 🤘
I've completed Part One of "Amplification Circuit" - Day 7 - Advent of Code 2019
with #TypeScript https://adventofcode.com/2019/day/7 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/a3ce4d1fbfd2562eb045f9daeab8f92f608575b1/day7
I failed on part 2, though.
I've simplified the control structure, but the programs just stop after a few
cycles:
https://github.com/coderbyheart/adventofcode/blob/5118b2526d2da9da490b665072afbe0aa400bb97/day7/calculateThrusterWithFeedbackLoop.ts#L23
I just completed "Space Image Format" - Day 8 - Advent of Code 2019 using
#TypeScript https://adventofcode.com/2019/day/8 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/6fc9725c229802a6031f3fc9a1f6237421612bae/day8
@EmmaWedekind They have the best "vin
chaud"!
@blundell_apps http -F -v
https://rsci.app.link/7liRR8D481
Using @clihttp will show you all the intermediate steps
@siljel nettkjøpen gikk feil?!
I just completed "Sensor Boost" - Day 9 - Advent of Code 2019 in #TypeScript
https://adventofcode.com/2019/day/9 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/0b9352547fab5ca25f15c0ffb5911f2cfa222050/day9
The snow is back in #Trondheim 🇳🇴


I just completed "Monitoring Station" - Day 10 - Advent of Code 2019 in
#TypeScript https://adventofcode.com/2019/day/10 #AdventOfCode
Got a little bit sidetracked, because I tried to solve it first using Bresenham
line drawing, but I missed some fineprint.
https://github.com/coderbyheart/adventofcode/tree/94567bbfe6f9bf63ead0780e90d7254d2a6fa2cd/day10
I dreamed I could fly Out in the blue Over this town Following you Over the
trees Subways and cars I'd try to find out Who you really are
💔
https://mailchi.mp/f61cce64dd41/marie-fredriksson-har-avlidit-5692205
A wholesome #techno set: https://www.youtube.com/watch?v=x9VYKrtziSg
@davidmekersa I can add some source code
comments later ... Is there anything specific you are wondering about?
The CSO [Chief Software Officer, U.S. Air Force] signed a Memorandum [...]
regarding the use of #DevSecOps and #Agile and highly discouraging from using
rigid, prescriptive frameworks such as the Scaled Agile Framework (#SAFe).
https://software.af.mil/wp-content/uploads/2019/12/DSOP-AMA-v1.0.pptx
@davidmekersa I've added more inline
comments, I hope that clarifies my approach.
Happy to answer specific questions!
I just completed "Space Police" - Day 11 - Advent of Code 2019 using #TypeScript
https://adventofcode.com/2019/day/11 #AdventOfCode
https://github.com/coderbyheart/adventofcode/tree/7b6fbf7d99c41249d3d6373fa744a4d4eae59f03/day11
@LaszloWa All the best!
That would be nice!
https://twitter.com/Landing_jobs/status/1204790488571809793
In the age of #DevOps, all getting started examples should always include how to
get everything in place using #gitops, not using the browser.
As developers we need to learn about how your platform supports reproducibility,
scalability in an approachable way.
It's annoying to get explained how I to build a one-off thing and then having to
piece together how to repeat this example hands-free.
Can the Chrome DevTools be too fast?!
I just completed "The N-Body Problem" - Day 12 - Advent of Code 2019 in
#TypeScript https://adventofcode.com/2019/day/12 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/aeb2d6c4bc1c3bfce13029a84a11ac40dce545be/day12
@stadtkindFFM Schlimm. Unten sind bestimmt
auch 1-3 Vapianos drin.
Should be just blue. https://twitter.com/tomwarren/status/1204782275755495428
@itsdaneesaur It's not very straightforward,
you need to upload the media file to S3 and then create the job.
Here is an example I just ran: mp3 (HR Info Podcast):
https://itsdaneesaur-transcribe.s3.eu-central-1.amazonaws.com/der_tag_in_hessen_20191210_83793670.mp3
and the SRT file:
https://itsdaneesaur-transcribe.s3.eu-central-1.amazonaws.com/der_tag_in_hessen_20191210_83793670.mp3.srt
I can show you how to do this yourself, or I can automate it.
10 years to late, but I have some hopes this will also inspire private investors
in Germany to make more seed and venture capital available. It might be good
timing given the current negative interest rates.
https://www.handelsblatt.com/politik/deutschland/start-up-finanzierung-bundesregierung-plant-einen-milliardenschweren-fonds-fuer-deutschland/25322864.html
I just completed "Care Package" - Day 13 - Advent of Code 2019 in #TypeScript
https://adventofcode.com/2019/day/13 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/85dcc3c0289f1ea903f9eb278b520766db5c977f/day13
Jets flying in Christmas Tree formation over #Trondheim right now: 🎄✈️
Someone interested in a Tunnelvortriebstechnikwerksbesichtigung? #🇩🇪
Sunset all day in #Trondheim 🇳🇴
This was at 13:12.
/status/1205878070848176128
I just completed "Space Stoichiometry" - Day 14 - Advent of Code 2019 in
#TypeScript https://adventofcode.com/2019/day/14 #AdventOfCode
Part 1 took me rather long to figure out ... and I needed to refactor it quite
significantly for the binary search in Part 2:
https://github.com/coderbyheart/adventofcode/tree/d0bcdd377b9883ea089c648d5cf136523546c1b9/day14
@toggleModal Parmesan.
I've completed Part One of "Oxygen System" - Day 15 - Advent of Code 2019 in
#TypeScript https://adventofcode.com/2019/day/15 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/f8682b89308f8bb189ffcbabd2e8ee1f264587e9/day15
I only completed Pt.1, for Pt.2 I need to modify my cave explorer to explore
everything, not just to the oxygen tank...
Got that quickly, now the floodfill is missing.
I've completed Part One of "Flawed Frequency Transmission" - Day 16 - Advent of
Code 2019 in #TypeScript https://adventofcode.com/2019/day/16 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/f1fa5e67c01fa05413de143dd7c047f1e88a8824/day16
I just completed "Oxygen System" - Day 15 - Advent of Code 2019 in #TypeScrip
https://adventofcode.com/2019/day/15 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/6a01cfc34e705e55d5bc49fef2d1155e7e9ad7f8/day15
Malicious packages may overwrite any file in the system:
https://blog.daniel-ruf.de/critical-design-flaw-npm-pnpm-yarn/
Off to the old hometown. #trondheim 🇳🇴 ✈️ #Frankfurt 🇩🇪
@Ravetracer Yeah, we left the warm clothes
here ;-)
Hello Frankfurt! 🇩🇪
The @oredev swag is still proving to be very
useful!
@3weststreet Thanks, Mag! Happy holidays for
you, too!
@rradczewski
@XING_de Diese Jahresendbudgetaufbrauchprojekte
gibt es doch immer!
@ThisIsFlorianK My solution is kinda complicated:
https://github.com/coderbyheart/adventofcode/tree/2019/day15#note
I've completed "Set and Forget" - Day 17 - Advent of Code 2019
https://adventofcode.com/2019/day/17 #AdventOfCode using #TypeScript
Code:
https://github.com/coderbyheart/adventofcode/tree/e621d5d2b9c0c57c7f3ad492293f913884fcf099/day17
However, I solved part 2 only manually, but described how to solve it (maybe
I'll get to this later):
https://github.com/coderbyheart/adventofcode/blob/93a2d99630efe62de7aee48ff22827accdd1f01b/day17/README.md#note
@tdpauw
@scanagile Welcome! I knew it was a great fit!
Finally found a good video intro to @Azure
functions, that also covers Resource Manger AND CI/CD! Thanks
@jeremylikness for making this:
https://www.youtube.com/playlist?list=PL1VfiVM16kp8U5E7U2tfJdskXJg8DPPKL
Didn't have so much time today, so I am going to share my partial solution for
"Many-Worlds Interpretation" - Day 18 - Advent of Code 2019 in #TypeScript
https://adventofcode.com/2019/day/18 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/6b3d2dae0e756e276068e115bc4b557101fc8696/day18
This approach only solves 4 of the 5 examples, so I have to read a little bit on
what to do different. My solution is using the shortest path, while keeping
track of visited state with the list of collected keys, so fields can be used
multiple times if collected keys change.
I've completed "Tractor Beam" - Day 19 - Advent of Code 2019
https://adventofcode.com/2019/day/19 #AdventOfCode in #TypeScript
Code:
https://github.com/coderbyheart/adventofcode/tree/fef4a1d5c612d262107d70da7f3c6cf41e77ba77/day19
@vicbergquist I'm in Germany right now and
oh what two hours later make for a difference...
"All they know is that it makes more financial sense to work together and
compete on brand and quality rather than try to control the [#iot] market with
standards. And for that, we should all be grateful. Assuming the alliance holds
together that is." https://www.theregister.co.uk/2019/12/18/iot_standards_war/
I've completed "Donut Maze" - Day 20 - Advent of Code 2019 in #TypeScript
https://adventofcode.com/2019/day/20 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/a4b3761d996cb525839e2f29a091666eae2672e5/day20
Solid plan! Last part of that is
@codefreeze_fi! ❄️☃️
I just completed "Springdroid Adventure" - Day 21 - Advent of Code 2019 using
#TypeScript https://adventofcode.com/2019/day/21 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/d468b580f6828f525374da4b68c4553fd2d6f394/day21
@dc7590
@kamilleblumm Thanks Darren, it's quite
fascinating to experience this difference right now. I need sunglasses here,
which I haven't used for weeks in Trondheim!
... and train yourself to spot and counter gatekeepers, toxic behaviour and even
small subtle things that prevent this very white, male community from changing.
https://twitter.com/TylerLeonhardt/status/1208508211419942912
@RidingWolf Put them on?
Exactly!
I've completed Part One of "Slam Shuffle" - Day 22 - Advent of Code 2019 using
#TypeScript https://adventofcode.com/2019/day/22 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/1132dc3f339d28c0fca73d911b93d40f30388898/day22
I tried to solved part 2 using a linked list, but that's totally not the way to
solve it, instead it's math.
Explanation of the real solution:
https://www.reddit.com/r/adventofcode/comments/ee0rqi/2019_day_22_solutions/fbnkaju/
What if we went to our families these holidays and set them all up with Pi-hole?
https://pi-hole.net/
@Niklas_L Yeah, this happens mostly when I
follow sponsored links on Google. For convenience that domain could be
unblocked, or explain how to spot sponsored content on Google.
I just completed "Category Six" - Day 23 - Advent of Code 2019 in #TypeScript
https://adventofcode.com/2019/day/23 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/63653be458a3c31a283f6be90a1416fd7060d740/day23
@oischinger
@Niklas_L It's fine if your router sets a
fallback DNS.
I asked a delivery driver today if they needed anything:
- bathroom break
- coffee / tee
- food.
The reaction was awesome! https://t.co/2xYquh5xe5
@vicbergquist This! Especially considering
the hefty fines for speeding...
I've completed "Planet of Discord" - Day 24 - Advent of Code 2019 using
#TypeScript https://adventofcode.com/2019/day/24 #AdventOfCode
Code:
https://github.com/coderbyheart/adventofcode/tree/149e7f33479b806139d9a6c95faa2892238e8157/day24
My visualization of the example looks like a 🎄!
This is a beautiful Christmas movie authentically set in Lapland:
https://en.wikipedia.org/wiki/Joulutarina
@DistributeAid Today I learned from my
friend @m_ic who founded
@BRYTER_io that they are using tech in the
legal space to improve the situation for asylum seekers:
https://www.instagram.com/p/B6iVwYoiimU/?igshid=1rjtfwbwk5ygc
@Ravetracer Absolutely!
Another way to mitigate this attack is to only let trusted sources update the
package-lock.json (👋 @greenkeeperio).
https://snyk.io/blog/why-npm-lockfiles-can-be-a-security-blindspot-for-injecting-malicious-modules/
@EmmaBostian Same Emma, same 💪👩⌨️!
My nephews have cool stuff, which I am happy to use: #javascript



@NativeWired Looking forward to seeing it
Sunday with the nephew!
@thomassnielsen Det eneste brød med disse
grøvhet jeg har funnet i Norge er Kornmo fra Orkla...
How is this not a subway?
https://twitter.com/elonmusk/status/1210775790440177664
@LaszloWa Yes, we have God Brød in Trondheim,
too. They are good, but the prices are hefty. My go-to heavy bread is Dansk
Rugbrød from REMA 1000, but I usually make myself.
@LaszloWa Coop and Meny have a Dansk Rugbrød
baking mix, which you can just make in a regular box baking form, this will be a
little lighter. https://www.regal.no/produkter/brodmikser/dansk-rugbrod-1000g/
We invented States for this.
https://twitter.com/derrickokeefe/status/1210962524188766208
@meikeco Wieviel sollen wir mitbringen?
@m_ic @maaretp
Maaret, definitely take the time to talk to this team, it has some of my
favorite humans in teach in it! (@benjamin,
@mirjam_diala,
@Niklas_L).
@benjamin @m_ic
@maaretp
@mirjam_diala
@Niklas_L
@Singsalad Ohh, right! It's official now! 👏
@fquednau
@XBowstech It's an @XBowstech and I love the
form factor, so I even take it with me on travel!
@fquednau
@XBowstech I don't work for them, and I am
currently traveling, so it's just how I feel about this keyboard.
I totally forgot that through https://czds.icann.org/ everyone can request
access to root Zone files. You can download the entire list of domains in the
@dothiv Zone, which still today has 284 domains. It's still amazing that i got
the chance to launch a segment of the internet.
@m_ic @benjamin
@maaretp
@mirjam_diala
@Niklas_L
@Singsalad
@s1m0nw1
@yangmeyer Truly an amazing team, that you have
assembled!
Today I did some work for #dothiv ... The charity is still hosting some of our
domain onwers' websites, like https://sinnerschrader.hiv and in 2020 we will
discontinue the DNS and web hosting services I set up back in 2014 for the
digital red ribbon. https://dothiv.github.io/hosting-eol/
It doesn't cost us much to provide this service but as a small team of
volunteers we can't provide the level of service that's needed when operating
internet-facing systems. We never charged for this service and we have no
obligations, but we want to make this situation explicit.
#Frankfurt has some nice views, too!


And then there is the struggle where you enter a small team as a CTO / Senior
and are supposed to set up the codebase for growth: Do you architect for the
team you have or the team you are going to have?
https://twitter.com/rickasaurus/status/1211432833463570432
@arne_mertz So you can refactor to increase
developer productivity? I think this is valuable, but on the other hand does not
yield new value for the customer, so this can't be done too often.
@arne_mertz That's the dilemma, you know that
you have a different team in a few quarters, and features take time, so which
configuration do you optimize for: the small team you have now, or the bigger
team you haven when the feature is complete?
@datenreisender
@wodarhospur Or you end up with a solution
that does not allow a big team to move forward quickly because in the past
certain aspects were never considered.
I believe that there is value in working with an eye on the future, because I'd
rather have the growing pains today.
@datenreisender
@wodarhospur But I have no clear guide and
that's what I wanted to point out, that this is for me one of the biggest
challenges in software development, especially in the context of startups.


