🔥 Burn Fat Fast. Discover How! 💪

The lazy guy channel

Logo of telegram channel thelazyguychannel — The lazy guy channel T
Logo of telegram channel thelazyguychannel — The lazy guy channel
Channel address: @thelazyguychannel
Categories: Technologies
Language: English
Subscribers: 248
Description from channel

Random stuff from random guy

Ratings & Reviews

2.50

2 reviews

Reviews can be left only by registered users. All reviews are moderated by admins.

5 stars

0

4 stars

0

3 stars

1

2 stars

1

1 stars

0


The latest Messages 2

2020-01-17 05:17:06 http://www.informit.com/articles/article.aspx?p=1193856

An old interview with Don Knuth (from 2008). It has lots of interesting parts. Some of which show Knuth’s weird sense of humour. Some are actual programming wisdom. Albeit may be useful only to a person who managed to write 1-megabyte program in one year with only 7 bugs found during next 40 years of its active use [1]. Some quotes which I found interesting (and partially agreeing to):

> I also must confess to a strong bias against the fashion for reusable code. To me, "re-editable code" is much, much better than an untouchable black box or toolkit. I could go on and on about this. If you’re totally convinced that reusable code is wonderful, I probably won’t be able to sway you anyway, but you’ll never convince me that reusable code isn’t mostly a menace.

> As to your real question, the idea of immediate compilation and "unit tests" appeals to me only rarely, when I’m feeling my way in a totally unknown environment and need feedback about what works and what doesn’t. Otherwise, lots of time is wasted on activities that I simply never need to perform or even think about. Nothing needs to be "mocked up."

[1]. This is obviously (second version of) TeX. I extrapolated number of bugs found based on the current bounty per found bug - $327.68. It started at $2.56 and doubled with each found bug. Thus only 7 bugs were found so far.
Other interesting well-known facts about TeX:
* TeX source is a single file written using literate programming style (https://en.wikipedia.org/wiki/Literate_programming for uninitiated). It means that it can either be compiled into a running program or be formatted as a book. Book was actually published in 1986. Someone has made a pdf from the source - http://brokestream.com/tex.pdf. Here’s the official source: http://mirror.ox.ac.uk/sites/ctan.org/systems/knuth/dist/tex/tex.web that this book is made from.
* TeX versioning started at 0 and slowly converges to pi with each release. Current version is 3.14159265.
* TeX is written in WEB. Which is a literate programming for weird Pascal variant from the early 80ies. Most TeX forks (including most widely used pdflatex) still use this technology. Because that Pascal variant doesn’t compile on modern systems a whole transpiler called “web2c” was made to convert that version of Pascal into C which can be compiled on modern systems.
* Some brave souls are trying to move source of truth from literate WEB program into regular C. I wish them luck. To me their reasons make perfect sense - https://www.tug.org/TUGboat/tb30-3/tb96hoekwater-pascal.pdf
670 viewsedited  02:17
Open / Comment
2020-01-08 13:00:52 https://fabiensanglard.net/fd_proxy/doom3/pdfs/johnc-plan_1999.pdf

A bit of classics – John Carmack’s .plan file (read it as: blog before blogs were a thing) from 1999 formatted as pdf. It covers Quake3 development timeframe. It is interesting to see how smart people’s minds work (and how much work they sometimes manage to do in a day). I rediscover Carmack’s .plan every few years, and each time I find it very entertaining.

Related thing – high-level review of Quake3 source: https://fabiensanglard.net/quake3/
639 views10:00
Open / Comment
2020-01-08 03:28:51 https://danluu.com/algorithms-interviews/

Dan Luu has posted an essay questioning the need for algorithmic questions during interview for software engineer positions. It is an interesting read, but I disagree with it a lot. I deal with the same problems that he mentions in his essay almost every day (I also work in a BigCo) – a lot of code that runs in production that is written less optimal than it should be. And in my experience people who do well during algorithms part of the interview are a lot less likely to write code that is accidentally quadratic. Or as it happens more often - intentionally quadratic, because author finds it simpler. Even though most of the time it is not simpler, just an author wasn’t able to recall a better alternative due to lack of experience.

Bonus 1, a blog about quadratic algorithms in popular open-source software: https://accidentallyquadratic.tumblr.com/

Bonus 2, an article about alternative to inverted indexes that is used in (part of?) Bing: https://danluu.com/bitfunnel-sigir.pdf
592 viewsedited  00:28
Open / Comment
2019-12-17 16:39:46 Not so long ago I read a book by Brian Kernigan – “Unix: A History and a Memore” (https://www.cs.princeton.edu/~bwk/memoir.html). It is an interesting piece of history, but I also learned some novel (for me) technical ideas from there which are mentioned in passing.

It is astounding how productive people were at the time at Bell Labs. There’s a bit on how Ken Thompson (accidentally) programmed unix in 3 weeks by writing 3 programs in 1 week each – editor, assembler and small kernel. Using hardware and tools of the time (basically typing binary code using a terminal).

566 views13:39
Open / Comment
2019-11-28 19:43:01 Ever thought why the C standard has this dumb idea of undefined behaviour on integer overflow? Well, there’s at least some reason for that – indexing with 32-bit integers on a 64-bit platform leads to suboptimal code due to need to support overflow correctly. UB on overflow allows to silently to substitute 32-integer with 64-bit integer and generate more straightforward code.

More detail in this gist: https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759de5a7

Also, this is the reason, why you should never use unsigned ints for indexing in C. Because their overflow is well-defined by the standard, compiler is not allowed to generate efficient code. Use size_t because it is guaranteed to be machine friendly.
558 views16:43
Open / Comment
2019-11-22 19:24:33 “The Windows 95 User Interface: A Case Study in Usability Engineering”

One of the most impactful things that Windows 95 left after itself is its user interface. Almost all desktop operating systems integrated (at least some) concepts introduced in Win95 by now. I’ve stumbled upon a report on how this UI was developed. I think this is a great example of UI/UX engineering that many people today could learn from.

https://socket3.wordpress.com/2018/02/03/designing-windows-95s-user-interface/
539 views16:24
Open / Comment
2019-11-19 15:00:12 When I only started my programming career, I used to ask, “what are you even trying to do?” in quite rude form when I encountered some question which didn’t make sense from my point of view. My manners have improved slightly since then. But I still ask essentially the same question.

There’s a phenomenon called “XY Problem” which is way too common in programming community. When people think of some (usually wrong or complicated) solution to their problem and ask questions about it, instead of asking for help with their initial problem. Always ask yourself and others – “what am I really trying to do?”, that helps a lot.

http://xyproblem.info/
501 viewsedited  12:00
Open / Comment
2019-11-14 19:21:12 I’ve been recommending people to watch talks by Jonathan Blow recently a lot. Here are a few more.

In 2008 he released a game called Braid (https://store.steampowered.com/app/26800/Braid/). It is puzzle-platformer built around a mechanics of rewinding time. I highly recommend playing this game, it is designed very well. And today I have found a talk from 2010 where he explains how rewind was implemented. No rocket science, pure practical engineering.



And another talk that I enjoyed a lot is called “Preventing the Collapse of Civilization”. Basically, he says that overall quality of software and programmer productivity are constantly decreasing and what we can do about it. It is a little overgeneralized but generally has the right message.

563 views16:21
Open / Comment
2019-11-14 00:07:53 A beautiful writeup of how Swift maintains ABI-compatibility when compiling dynamic libraries. It is easy to extend API without breaking ABI in managed languages like Java and C# because code is JIT-compiled with each run. With languages compiled to machine code ahead of time like C and C++ it is trivial to break ABI by adding single field to a struct, so authors of libraries must be extremely careful with changes.

Swift invented (?) a unique approach, or rather a whole bunch of different techniques, of late binding which work well with extending API without ABI breakage. Linked text actually gives a very good rationale why it is needed and how it is implemented without going into too low-level details.

https://gankra.github.io/blah/swift-abi/
452 viewsedited  21:07
Open / Comment
2019-11-03 01:58:00 I’ve seen Jonathan Blow videos on youtube a few times before. I thought of him as “some weird dude that makes yet another C-like language” (He has a series of 60 videos on his JAI language so far). But he is an accomplished games designer and developer. (Accomplished enough to have a quite large entry in Wikipedia).

He has a lot of great talks/rants online. You don’t have to agree with all his statements. But he has good arguments to support his views, so I would recommend watching at least one his vide to form your own opinion about him and his ideas. I guess, most people would either love or hate him.

Here’s a good starting point:

549 views22:58
Open / Comment