Tag programming

72 bookmarks have this tag.

2024-04-03

1216.

s-macke/VoxelSpace: Terrain rendering algorithm in less than 20 lines of code

github.com/s-macke/VoxelSpace

Terrain rendering algorithm in less than 20 lines of code - s-macke/VoxelSpace

via https://t.me/optorepost/55

Если кратко, то там вся карта хранится в виде двух текстур, а "воксели" рендерятся хитрым образом, просто проходя по этим текстурам в нужном порядке.

2024-04-02

1214.

EditorConfig

editorconfig.org

EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.

2024-04-01

1212.

Trunk Based Development

trunkbaseddevelopment.com

A source-control branching model, where developers collaborate on code in a single branch called ‘trunk’ *,
resist any pressure to create other long-lived development branches by employing documented techniques. They
therefore avoid merge hell, do not break the build, and live happily ever after.

2024-03-21

1202.

Interning strings in Go

commaok.xyz/post/intern-strings

In Go, a string is a (possibly empty) immutable sequence of bytes. The critical word here for our purposes is immutable. Because byte slices are mutable, converting between string and []byte generally requires an alloc and copy, which is expensive.

What if such conversions were cached? That would make comparing strings so much faster!: two integer comparisons (len and ptr). This article explains how this approach could be implemented.

A library implementing this:

It looks pretty small and simple. Despite having only 81 stars, it is used by 67.4k GitHub packages. Transitive dependencies. Found it at work accidentally. OpenSource woes.

2024-03-11

1196.

Choose Boring Technology

boringtechnology.club

Innovation tokens and whatnot.

2024-03-06

Reposted 1180.

Wrapping Errors in Go - How to Handle Nested Errors

blog.boot.dev/golang/wrapping-errors-in-go-how-to-handle-nested-errors

By wrapping errors and building well-formatted error messages, we can keep better track of where errors are happening. I often just add the name of the function being called to my error messages, but we can make the message say whatever we want. For example, I’ll often include parameter information in the error so I know which inputs caused the error.

2024-03-05

1177.

Task

taskfile.dev

Task is a task runner / build tool that aims to be simpler and easier to use

version: '3'

tasks:
  hello:
    cmds:
      - echo 'Hello World from Task!'
    silent: true

2024-03-02

1167.

Universal domain types

mmapped.blog/posts/25-domain-types.html

A guide to domain-specific types that make sense.

2024-02-22

Reposted 1153.

Strategy pattern in Go

rednafi.com/go/strategy_pattern

2024-02-05

1114.

What Can Philosophers Learn from Programmers?

250bpm.com/blog:133

Programmers are the builders of ontologies.

1108.

Introducing Pkl, a programming language for configuration :: Pkl Docs

pkl-lang.org/blog/introducing-pkl.html

Apple released a language for configs. It's well-designed, take a look. Has Go bindings. I would've considered it if I needed a config language.

2024-02-04

1105.

On Rigorous Error Handling

250bpm.com/blog:140
1103.

Такой же

grishaev.me/the-same

Гришаев решил корабль Тезея.

2024-02-02

1088.

Don’t prefill config files

www.makeworld.space/2024/02/no_prefill_config.html

The biggest design mistake I made with Amfora, my first community open source project, was autogenerating config files. On startup, the application looks for a config file, and creates one if it doesn’t exist, full of all the application defaults. At the time, I thought this was great, as it documents all the existing options, and makes them very visible to the user in case they want to change them. In the end, this decision created a lot of headaches and is not something I’d ever do again.

makeworld is right! I had the same problem in Mycorrhiza but didn't suffer great consequences because the configuration design didn't change much.

2024-01-31

1084.

Some activities are harder than others

alexschroeder.ch/view/2024-01-31-activities

Alex tells us that, for him, baking and cooking are easier than programming and soldering, because the errors there average out. As for me, this is completely inverse.

In programming, an error never fixes itself. You can observe it and fix it, you can write tests. You can run the program multiple times. It's you who fixes it, and you can understand how it's done. It's measurable!

Meanwhile, cooking is a nightmare. Burning something is routine for me. Is that too much or too little oil? For how long do I fry? What do I do with these spices? Do they really affect the taste? And to observe something, I can't rely on symbolic things like text. No, I have to look (is this color good? No idea!), smell (as if I know the difference) and taste (nothing more inaccurate).

I'm happy when something can be cooked with a timer. 15 min for buckwheat? I'm in. I'm more happy when the time is short. 4 min for this thin kind of spaghetti? Already boiling water!

I mean, even boiling water is not simple. My parents told me to wait until the correct bubbles appear. I'm waiting for the scary ones. Also, salt is supposed to make it boil faster. How much salt do I add?

And I didn't even talk about plants, which Alex also considers easy. They're not 😭

2024-01-29

Reposted 1079.

Вложенность

grishaev.me/nesting-01

Беру любой JSON и вижу, как его можно упростить, убрав лишнюю вложенность. Вдвойне обидно, что на эту вложенность кто-то тратил время, а она не нужна!

2024-01-21

1072.

SocialHub

socialhub.activitypub.rocks

Where ActivityPub developers coordinate their efforts to make the Fediverse a great space for cooperation

A forum for the fedidevs. What's funny is this notice it shows on my outdated Safari:

Unfortunately, your browser is unsupported. Please switch to a supported browser to view rich content, log in and reply.

This sentence contains to a funky website that recommends some browsers. Links2 is not there for some reason.

I should join the forum though, as I'm a proud fedidev now!

2024-01-20

1070.

Magic numbers in C

250bpm.com/blog:43

Replacing all magic numbers with variables/constants is not always good. Think.

1069.

Finish your stuff

250bpm.com/blog:50

If there is one principle that should be added to the UNIX philosophy, it is:

"Finish your project."

Let me list my finished projects.

  • Uh...

I can't even say Mycorrhiza is finished despite it being in maintenance mode!

1066.

Hard Things in Computer Science: Naming things

250bpm.com/blog:110

Martin came up with the idea of using something like the roots from semitic languages for naming things. I thought of the same before I read this article, but it's good to have it written down by somebody.

2024-01-11

1035.

Shirky: Situated Software

web.archive.org/web/20190213201804/http://shirky.com/writings/situated_software.html

2024-01-08

1021.

The beauty of finished software

josem.co/the-beauty-of-finished-software

All these retrogrades usually forget about Unicode updates! If your finished software does not support the newest writing system, then something is wrong. Well, I'm just saying. Actually, I like finished software! One day, I'll write one.

2024-01-07

1018.

Gitpod: Always ready-to-code.

www.gitpod.io

Gitpod is a cloud development environment for teams to efficiently and securely develop software. Improve your team's developer experience by coding in a CDE.

Mysh recommended me this.

2024-01-02

1007.

Реальный Windows. Пишем realtime под окошками

habr.com/ru/articles/652291

Результат всего этого счастья нужен в режиме реального времени и крайне важен. Пропускать нельзя ни одного замера, потому что основную работу по анализу данных исследователи выполняют после окончания эксперимента. Поэтому всё это богатство данных, помимо показа на экране, придётся записывать на жёсткий диск. Все 1,3 гигабайта данных в секунду. И потом читать в Matlab'е, NeuroExplorer'е или другой программе. Система, которая сохраняла 99,99999% данных, не прошла контроль качества и была забракована, потому что теряла до 13 тысяч замеров каждую секунду.

В комментах пишут ещё:

я долго мечтал войти в медицину и больше 5 лет пытался работать с врачами. в итоге пришёл к печальному выводу, что это очень трудные во взаимодействии люди. не умеют мыслить структурно, стараются постоянно держать лицо, привыкли к строгой иерархии и за её пределами работать не обучены. так что непреодолимое и авторитарное требование виндовса тут неудивительно.

Статью написал Alex Hitech, что уже показатель качества. И комментарии у него заводные:

Мозг необязательно должен быть человеческим. Большинство исследований мозга выполняются на крысах и мышах, — их мозг очень похож на наш, а стоят они не в пример дешевле.

2023-12-19

985.

Zeal - Offline Documentation Browser

zealdocs.org

2023-12-17

Reposted 981.

Banish state-mutating methods from data classes

rednafi.com/python/dataclasses_and_methods

Data classes are containers for your data—not behavior

2023-12-02

947.

Confessions of an Abstraction Hater

250bpm.com/blog:144

Somehow, longer functions are good.

2023-12-01

937.

Redowan's Reflections

rednafi.com

Hi, I'm Redowan Delowar—a wandering sciolist with a flair for ones and zeros. I learn, write, and tweet about Python, Go, SQL, and the broader landscape of software in general.

2023-11-30

936.

Laurence Tratt: Four Kinds of Optimisation

tratt.net/laurie/blog/2023/four_kinds_of_optimisation.html
  1. Use a better algorithm.

  2. Use a better data-structure.

  3. Use a lower-level system.

  4. Accept a less precise solution.

Pick the simplest solution.

2023-11-22

900.

write your own terminal

flak.tedunangst.com/post/write-your-own-terminal

2023-11-21

892.

ЯОС, MINOS - Вече на п-п-р

вече.программирование-по-русски.рф/viewforum.php?f=5

Там творятся удивительные вещи.

2023-11-20

Reposted 887.

Gripes With Go

peppe.rs/posts/gripes_with_go

2023-11-16

867.

NilAway: Practical Nil Panic Detection for Go

www.uber.com/blog/nilaway-practical-nil-panic-detection-for-go

A linter for Go that finds nil panics. It found several potential nil panic in Betula and Mycorrhiza codebases that I didn't bother fixing.

2023-11-14

859.

Pets vs. Cattle — «Питомцы vs. Скот». 99% вашей работы в итоге выбросят. Но это и сделает вас профессионалом — Вастрик

vas3k.blog/notes/pets_vs_cattle

Вастрик сравнивает программистов, которым по работе надо постоянно выбрасывать свой код, с фермерами, которые при первой необходимости забивают свой скот. Говорит, что пет-проекты — это уже питомцы, и о них уже можно заботиться.

2023-10-31

825.

The Ken Thompson Hack

kidneybone.com/c2/wiki/TheKenThompsonHack

Ken describes how he injected a virus into a compiler. Not only did his compiler know it was compiling the login function and inject a backdoor, but it also knew when it was compiling itself and injected the backdoor generator into the compiler it was creating. The source code for the compiler thereafter contains no evidence of either virus.

2023-10-22

809.

Concatenative wiki

concatenative.org

A wiki about concatenative programming languages running a custom (looking good) wiki engine with a custom markup!

799.

Data Oriented Design, a.k.a. Lower Level Programming?

hisham.hm/2022/02/19/data-oriented-design-aka-lower-level-programming

2023-10-16

761.

Implementing VisiCalc

www.landley.net/history/mirror/apple2/implementingvisicalc.html

2023-10-06

669.

ASCII protocol buffers as config files

rachelbythebay.com/w/2023/10/05/config

2023-09-24

638.

</> htmx ~ Why htmx Does Not Have a Build Step

htmx.org/essays/no-build-step

2023-09-18

623.

Project Fluent

projectfluent.org
# Simple things are simple.
hello-user = Hello, {$userName}!

# Complex things are possible.
shared-photos =
    {$userName} {$photoCount ->
        [one] added a new photo
       *[other] added {$photoCount} new photos
    } to {$userGender ->
        [male] his stream
        [female] her stream
       *[other] their stream
    }.

2023-09-15

617.

Comparative Analysis

matklad.github.io/2023/09/13/comparative-analysis.html

< and <= are better than > and >=

2023-08-03

539.

Cathedrals on Quicksand | starbreaker.org

starbreaker.org/blog/cathedrals-on-quicksand/index.html

Matthew finds deep distaste in his software engineering job but has no idea what to change. We'll all be there.

2023-07-29

526.

The Wrong Abstraction — Sandi Metz

sandimetz.com/blog/2016/1/20/the-wrong-abstraction

Some abstractions are wrong. To get rid of them, inline them, rip the unneeded stuff, and forget about the abstraction. I want to rip an abstraction like that!

525.

research!rsc: Using Uninitialized Memory for Fun and Profit

research.swtch.com/sparse

You can have a very time efficient set implementation with two uninitialized arrays. It's not space efficient though.

2023-07-28

524.

Post Collapse Computing Part 1: The Crisis is Here – Space and Meaning

blogs.gnome.org/tbernard/2022/08/24/post-collapse-computing-1

Tetralogy. The climate catastrophe is two years away (just by the time I'll finish the bachelor degree).

To save the planet, actions are needed. They are not done.

Also, further parts of the series talk about software.

if we fail to mitigate the climate crisis, we’re headed for a world where it’s expensive or impossible to get new hardware, where electrical power is scarce, internet access is not the norm, and cloud services don’t exist anymore or are largely inaccessible due to lack of internet.

2023-07-27

522.

Doing Things That Scale – Space and Meaning

blogs.gnome.org/tbernard/2020/01/17/doing-things-that-scale

Tobias told us about his past with a very elaborate riced Arch Linux config. Now he's a GNOME developer, who knows that it's better to contribute a better icon to the app than to update an icon theme; to use fish instead of zsh with a big config; etc. In general, invest time into things that scale.

I like his little remark towards the static site. I dislike his little remark towards self-hosting, although I see where he's coming from.

2023-07-12

444.

research!rsc: Storing Data in Control Flow

research.swtch.com/pcdata

Oh, that's how I should refactor Mycomarkup. Perfect.

2023-07-07

433.

Under the Radar #267: Don't Run Servers - Relay FM

www.relay.fm/radar/267

Два аёс-разработчика говорят, что если можно сделать продукт, не поднимая сервер, лучше так и сделать, особенно учитывая какие прекрасные возможности для программиста дают современные яблочные устройства. Синхронизация через яклаўд, производительность до дурного высокая и всё такое.

Я, конечно, не аёс-разработчик, но могу обратить внимание на то, что у меня ваще всё с сервером. А ведь Бетулу можно было бы и без него! Но на самом деле получилось бы хуже, ведь мне не один айфон поддерживать, а как минимум андроид и мак, которыми я пользуюсь.

Подкаст можете не слушать, я за вас послушал.

via https://ilyabirman.ru/meanwhile/all/listening-65/

2023-07-03

420.

The Cost of Abstraction

250bpm.com/blog:86

Take the cost of introducing new abstractions to your code in consideration.

2023-07-02

409.

Unit Test Fetish

250bpm.com/blog:40

Unit tests are not a panacea. End-to-end tests are often much more useful. Some things cannot be tested at all. Think before testing.

2023-07-01

400.

David J. Pearce (Formalising a Simple Virtual Machine)

whileydave.com/2022/06/28/formalising-a-simple-virtual-machine

2023-06-18

372.

Confessions

www.marginalia.nu/log/81-confessions

A collection of bad practices. Some of them I like!

369.

Re: Редактор acme: пишем почтовый клиент

club.hugeping.ru/HUVDXENYzA56RsIsqnSt#HUVDXENYzA56RsIsqnSt
365.

Строки по 80

grishaev.me/strings-80

Иной айтишник нет-нет да пожалуется на разбиение строк по 80 символов. Считаю нужным прояснить ситуацию.

Гришаев говорит глупости, чтобы оправдать ограничение длины строк. Справедливости ради, он не цепляется именно за 80, но идеи дурные, конечно.

356.

Command-line Tools can be 235x Faster than your Hadoop Cluster - Adam Drake

adamdrake.com/command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html

2023-06-16

349.

A meditation on correctness in software @ marginalia.nu

www.marginalia.nu/log/50-meditation-on-software-correctness

2023-06-15

346.

Do not log

sobolevn.me/2020/03/do-not-log

Logging is not panacea.

2023-06-05

282.

Using computers more freely and safely

akkartik.name/freewheeling

Kartik rocking.

2023-05-31

267.

Chris's Wiki :: FrontPage

utcc.utoronto.ca/~cks/space/FrontPage

A static site, that claims to be a wiki. It is old and fun.

2023-05-24

258.

Digital encoding. Legacy software. Evolution.

250bpm.com/blog:89

We’ve finally got to the point in the software world where no big changes are possible. Every change breaks something, introduces backward incompatibilities and so on. More are more we are going to live in the world where software mutates gradually, advancing is small steps without much plan and intelligent design. Similarly to how organisms are dragged by natural selection, it is going to be propelled in unknown direction without asking us whether we like it or not.

The software industry is reaching the stage where it cannot be revolutionized heavily, it is to evolve like the living ones. It is not necessarily good.

257.

Sure, we have imperative and functional. But what about cartesian programming?

250bpm.com/blog:91

2023-05-19

253.

Humble Chronicles: State Management

tonsky.me/blog/humble-state

Search for the best state management solution for Humble UI

2023-05-14

238.

I don't want to go to Chel-C

applied-langua.ge/posts/i-dont-want-to-go-to-chel-c.html

A classic rant on uxn and programming. Uxn is done for.

Uxn says it's about permacomputing and vintage computing, the author of the article says it's not and proves it.

The author insists on a relation to permacomputing. Their page on permacomputing describes frugal computing and salvage computing as principles of permacomputing, defining them as "utilizing computational resources as finite and precious, to be utilised only when necessary, and as effectively as possible", and "utilizing only already available computational resources, to be limited by that which is already produced." The author is part of a collective that wanted to replace all the "bloated" software they used, due to having little energy storage on their sailboat. Using software design techniques to reduce power usage, and to allow continued use of old computers is a good idea, but the uxn machine has quite the opposite effect, due to inefficient implementations and a poorly designed virtual machine, which does not lend itself to writing an efficient implementation easily.

Devine then mentioned it, and a discussion followed.

1