It's that time of the week again. So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.
![Yoda woopi...
For further actions, you may consider blocking this person and/or reporting abuse
I learned that git switch is useful for moving changes over to a new branch if you forget to checkout before working 🙃 Stuff happens 🤷♀️
In the process of getting feedback about my recently engineered portfolio site, I also learned to better value my talents as a dev, instead of being so modest I “undersell” myself. I have no interest in overselling either - but self confidence is somewhere in the middle, and I’m learning to be there more often. Getting ample feedback about my projects from my dev friends helps that along :)
Awesome!
I'm currently creating a Web3 course and so I read about elliptic curve cryptography. I wanted to understand what the keys in Ethereum actually are.
ECC is based on elliptic curves; basically, math functions on a 2D space
(x/y)
.ECC on Ethereum uses a particular standard curve, called secp256k1.
This curve is defined by the equation
y²=x³+7 mod p
ory=sqrt(x³+7) mod p
The curve doesn't use the real numbers, but a fixed set of numbers called a finite field.
A fixed set of numbers, in this case, means there are
115792089237316195423570985008687907853269984665640564039457584007908834671663
numbers in the field that secp256k1 is defined for. This number is thep
from the equation above, a large prime number. Crazy big, but still smaller than all real numbers, lol.The idea here is if you calculate something and it gets greater than
p
, you get an overflow and go on from0
.The private key is just a random integer between
0
andp
.This integer defines how often a base point
g
on that curve has to be added to itself to get the public key. The base pointg
is also predefined by secp256k1, and since it's a point on that curve, it's anx
andy
coordinate on the curve, and basically two big integers.So, if the private key was
5
, the public key would be the result ofg+g+g+g+g
.The
+
isn't a common addition but a more complex operation that uses two points (in this case, bothg
) to calculate a new point on the curve.So, the public key would be a point, or an x and y coordinate on that
y²=x³+7 mod p
curve. Bothx
andy
will be integers smaller thanp
because of overflow etc.So to sum all up.
The private key is a random 256bit integer smaller than that big prime I mentioned.
The public key is two integers, essentially x and y coordinates, defining a point on the secp256k1 curve. You get this point by executing a special kind of addition on a predefined base point "private key times".
That's awesome! 🔥
<p> <style "background-color:red"> hi </style></p>
`.Nice!
I started learning JavaFX again, left it some years ago because my job didn't allow much time for it. The new thing I learned about it is there isn't enough documentation or resources to properly get started, it feels staggered. Compared to the UI libraries of C#, Microsoft did a very good job to make it feel more cohesive with the .net platform for developers, wish Oracle could do the same.
I learnt that I need to conserve my keystrokes and use writing as a medium to convey my point to a larger audience.
Based on this advice, I wrote documents for a service that I am implementing at work.
Along with this, I am adding a blog functionality to my website (using DatoCMS) and shall be sharing/learning in public using my writing. (I shall keep you updated on this).
I am continuing my financial education using books and have finally sought a financial adviser to better guide me through my journey.
May I please know what you learnt @nickytonline ?
What I learnt this past week was that there are now Netlify scheduled functions.
Recipe for carrot muffins. Seriously, my biggest discovery of the week :D
Nice!
I am currently learning Javascript with Scrimba. Learning by building apps.
I learned how to get started with a MongoDB database
Let's go!
visidata is such a good tui for almost all things json, including aws eventbridge rules comfing from the cli.
waylonwalker.com/til/aws-eventbrid...
Completed my project github.com/DeathVenom54/github-dep...
Proud of it, and explaining article coming soon :D
Noice!
This is embarrassing but I'll share anyway. I've been developing software for over 25 years. I spent 3 hours today trying to figure out why in my react app that I assigning the variable
document
to a File object anddocument
kept showing as undefined. Well, friendsdocument
is a reserved word in JS (at least that's how Babel seems to be treating it under the hood). But instead of throwing errors that I did something stupid it failed silently and just assigned undefined. Very frustrating.