News for hackers. Stuff that matters.

carbonBasedRbt

Re:Cargo Cult Programming on Monday April 17, 2023 @04:43PM (#35606347)
Cargo pants are the best. Every other pants tends to get holes in my pockets after a few months. Oh wait is that not the same ?
Re:Blend2D – Fast 2D vector graphics library on Thursday March 23, 2023 @05:36PM (#35281629)
So happy to see this mentioned here ! I agree and i think mister Shemanarev would aswell. The AsmJit system is really interesting as well. As a writer of a small c++ graphics library i am very confident in the quality and used it as a software rendering solution and backend for painting tools, it's robust and may only improve. Bravo to Petr Kobalicek, the main author of Blend2D
Re:Ask HN: How to learn CS and programming on your own? on Tuesday February 21, 2023 @01:46PM (#34885055)
This is an exemple of an experience to learn programming specifically, although i was a teen when i applied these steps ( blindly ):

- Get the basics of programming from written ( no videos ) tutorials available online. Many are good quality and you skim through at your own pace.

- Pick a "difficult" compiled language, like C++. You'll also get insight on how interpreters for languages such as js or python work as well, and the low level stuff will make the high level concepts trivial to understand further down the line.

- Pick one or more simple and fun projects to do alone: a console text-based adventure, a glitchy platformer with SDL or SFML, a web scrapper with python, a tool to automate a task you find annoying in Batch script.

- Once you're there, reach out to programming communities. I used to go to irc channels. I'm not a big fan otherwise, but now some discord servers are full of people you can get insight from now and well-meaning people, who would be happy to show you some strings if you ask nicely.

- If you are in trouble, remember to make a minimal reproducible example of your issue with as few code as you can, more often than not this can lead to you finding the solution by yourself.

- If this doesn't work and you struggle with something, don't be afraid of recognising your ignorance: this stuff is not simple, no one guesses it all alone, ask for help while showing you did try other available solutions given your current knowledge.

- Be patient and learn to read code from other projects as well as documentations, this will provide incredible insight about expected/standard approaches for common problems.

- Rest, having pauses up to 1-2 weeks during the early process will help you integrate this complex stuff naturally, no need to burn yourself out. You may occasionally think about it during a walk or a shower and that's where the familirity builds up.

- Pick-up some boring books such as Bjarnes Stroutrup's one and read it without thinking too much. This can serve as reference without needing a network connection and that's invaluable. I can recommend other books for this purpose to read mindlessly if you're interested.

- Recognize your improvments, especially in the early stages the learning curve is incredibly rewarding, feel good about having a little square moving in your window, show it to your friends !

- Get into more serious maths, a good way to do that is to get the hang of linear algebra through parametric equation, solving 1 or 2 degree equations, vector and matrix, in the context of computer graphics. Graphics helps having satisfying feedback, identify issues intuitively, while exploring the basics of these concepts.

- Find a more serious project to work on, maybe you already have an idea, have fun and keep digging :)

[Edited: typos and formating]

Re:Watermark an Image on Tuesday February 21, 2023 @11:57AM (#34883436)
I always pondered on the idea of embedding a few bytes of watermark in an image color channels for the same purpose, storing minimal info in an invisible way for the viewer. For instance a naive blurry idea approach would be to encode a relative difference in the R color channels of all 4 corner pixels of the bitmap. It could get a bit more robust or sophisticated as well of course. I am aware compression and crop could corrupt this but it would be feasible to add redundancy or workarounds up to a certain point for these issues. Any idea if this has been done before ?