Readit News logoReadit News
deniska commented on Ask HN: Programmers who don't use autocomplete/LSP, how do you do it?    · Posted by u/zackoverflow
deniska · 8 months ago
At some point, python became the language I use the most. And its IDEs… are frankly not really great. They are doing their best, but given the dynamic nature of the language, the experience of using autocomplete and other similar features is often jarring enough, when it doesn't do what you want it to do, to be annoying.

So I mostly stuck with really simple text editors (first likes of notepad++, geany and gedit, later switched to barely customized vim). You learn the language, you learn its standard lib, you learn the libraries you use often, you learn to navigate their docs. You learn the project you are working on, and remember how things are named. I do use a simple autocomplete (ctrl+n in vim), but it's more of a typo preventer (or a typo propagator, depending on how you look at it). It autocompletes every word in open files. Which might be more handy than it sounds, because it will autocomplete stuff not typically being autocompleted in IDEs, like json keys, or file names in the open directory listings, or even outputs in the open terminal session.

As for navigating unfamiliar code bases and "go-to-definition": it's grep. Just search for a substring in the whole project. You will find the definition. You will also find some other interesting stuff, which "normal" IDE tools wouldn't look into. Heck, you'll find interesting comments, interesting name clashes, interesting usecases for a thing you were looking for. And it's a language agnostic skill. You don't need another bespoke IDE, you don't need to configure some weird LSP to navigate unfamiliar code base even in not so familiar language.

deniska commented on Flappy Bird for Android, only C, under 100KB   github.com/VadimBoev/Flap... · Posted by u/lostmsu
mdp2021 · a year ago
Could this technique, using rawdrawandroid to write C applications for Android, also use raylib (and other C frameworks)?

And maybe could this developing system be used through Termux, to have a C development environment on Android for Android?

deniska · a year ago
Yes, raylib does support android. I have a slightly incomplete build script I use for my raylib projects (obviously you need to take better care of signing, you probably want to build for other targets besides aarch64, your SDK is probably not installed in /home/denis, and I'm not sure whether I'm adding .so files to apk in a way modern android prefers, but it still works).

https://gist.github.com/deniska/f1ee73e18e1444eb724c01f933b6...

deniska commented on Arrest of Pavel Durov, Telegram CEO, charges of terrorism, fraud, child porn   decripto.org/en/arrest-of... · Posted by u/toss1
deniska · a year ago
Some time ago many people in Russia wished that Russia will become a normal European country. I guess the wishes were granted, but not in a way we wanted.
deniska commented on Pg_hint_plan: Force PostgreSQL to execute query plans the way you want   github.com/ossc-db/pg_hin... · Posted by u/justinclift
adamzochowski · a year ago
Aren't there two arguments for why this is bad?

- db will generate new plans as necessary when row counts and values change. Putting in hints makes the plan rigid likely leading to headaches down the line.

- as new Postgres comes out, it's planner will do a better job. Again forcing specific plan might force the planner into optimization that no longer is optimal.

In my experience developers almost never comeback to a query with hints to double check if hints are really needed.

Famously oracle has query hints that don't do nothing no more, that are ignored, but oracle can't remove them from query language because that would break too many existing queries.

I like Postgres stance that if query planner doesn't do a good job, then dba should first update table/column statistics, and if things are truly bad, submit but to Postgres so the query optimizer can be updated itself.

Saying all that, hints support through an extension to Postgres is a good compromise. Postgres developers don't need to bother with hints, its a third party feature. And dba/users, if they really need hints, now they have them.

deniska · a year ago
Why it's good: you won't get a sudden slowdown if postgresql for some reason changes its plan to something much less performant.
deniska commented on FreeBasic   freebasic.net/... · Posted by u/debo_
deniska · 2 years ago
I started with the basic family of languages. VB6, QBasic (yes in this strange order), VB.Net, PowerBasic, FreeBasic.

FreeBasic was probably the most fun of them to me: cross-platform, compiles to fairly fast running binaries, can easily interface with libraries written in C, and has qbasic syntax mode.

deniska commented on Reviving decade-old Macs with antiX and MX Linux (2022)   sts10.github.io/2022/12/1... · Posted by u/indigodaddy
DeathArrow · 2 years ago
>If you take care to avoid the "modern" bloated crap, or notoriously intensive like new games, or now AI-related stuff, a decade-old computer is absolutely more than enough computing power for a lot of things.

Most likely your phone is more powerful than those old computers. Why not just hook it into an external monitor and use it?

deniska · 2 years ago
Because they come with not-really-multitasking OSes, with restricted access to file system and limited selection of software.
deniska commented on The Maddest My Code Made Anyone   jackkelly.name/blog/archi... · Posted by u/signa11
tuvan · 2 years ago
Wasnt the modding scene a result of game dev from scratch being inaccessible? Downloading UE/Unity/Godot and making your dream game is probably easier nowadays than trying to make it as a HL mod then.
deniska · 2 years ago
Yes and no.

Modding a game means that you have a specific starting point, the original game, which you are probably a fan of. And you may want your creation to be a part of this original world, share some (or most) of gameplay elements, design elements, story elements etc.

People modded Half-Life not only because modding Half-Life was somewhat easier than making an FPS game from scratch, but also because they wanted to explore the original story from another angle, or they liked how engine feels to play, or for whatever other reason wanted a starting point to be a complete game. Kind of the original asset store: the assets of the game you are modding.

deniska commented on Underappreciated challenges with Python packaging   pypackaging-native.github... · Posted by u/groodt
deniska · 3 years ago
With modern tooling packaging pure python code to be used by other python developers is a relatively painless process.

The main problem with python packaging is that it's often C/C++ packaging in disguise, among multiple OSes and CPU architectures, and that's far from being solved. Building such python wheel is essentially like building a "portable" (aka one you don't need to properly install into the system) linux/windows/macos application. That comes with a variety of caveats and requires some specialized knowledge one wouldn't pick up playing around with just python alone.

deniska commented on Fred Brooks has died   twitter.com/stevebellovin... · Posted by u/tkhattra
quickthrower2 · 3 years ago
It used to mean that, but a programmer changed the meaning. They could.

(a) rename the column, be the guy who broke the system and spend all weekend trying to fix 6 systems he never knew existed, written in Access, Excel, Crystal Reports, VB6, Delphi and a CMD file on a contractors laptop.

(b) keep the column name, deliver the feature, go home.

deniska · 3 years ago
We prefer option c: add a new table/column with similar looking name. Then few years later start wondering why there're two almost identical entities, and why one of them behaves weirder than another.
deniska commented on Show HN: Wa-tunnel – HTTP Tunneling through Whatsapp   github.com/aleixrodriala/... · Posted by u/aleixrodriala
judge2020 · 3 years ago
There is a limited amount of throughput a tower can handle, both on its backhaul and antennas. Depending on what you're doing over that tethered connection, you might be using up 2x-10x the throughput they provisioned for "you"; if enough people tether at once during rush hour, there's going to be a significant drop in speeds for both you and people just trying to use their phones normally.

This is why that, when phones tether, those tethered packets are routed separately so that the cell carrier can throttle them when needed to maintal quality of service for everyone else.

By tethering/tunneling through your normal connection, they can't do this, and if this became an epidemic they would either need to do thorough DPI and heuristics to detect and block the tethering/ban the user, or over-provision their towers to handle the varied traffic volumes of both regular cell phone activity and people watching 4k Netflix on their TV through their phone.

deniska · 3 years ago
Fine.

launches bittorrent client on the phone

u/deniska

KarmaCake day218February 24, 2012View Original