HN user

vonseel

1,130 karma
Posts9
Comments809
View on HN

I bought my iPad 5th gen years ago pretty much for reading PDFs. Sadly, it's barely even usable for that, even after a fresh device reset it's laggy and so slow. I'm not sure if it was always that way; I don't think so. I've stopped upgrading iOS but I think I'm already at 15, if there's a way to go wayyy back that's probably what I want to do, but it's sad that even an iPad can be bogged down so much as to barely run PDF readers. And I always wished mine supported pencil / annotations, but I think I'm one generation behind.

I imagine most employees who get by in cloud docs (Google/Microsoft/etc.) and don't really open apps other than browsers can learn to be comfortable with an iPad, but many people don't want to. I have friends who refuse to even learn to use a trackpad on Macbook because they are so set in their ways.

I am no where near an expert on this subject, and this information is from a few months ago so maybe it's outdated, but people on Reddit[1] are claiming running the llama with 65B parameters would need like 20K+ of GPUs. A 40GB A100 looks like it's almost $8K on Amazon, and I'm sure you could do a lot with just one of those, but that's already beyond your $5K budget.

[1] https://www.reddit.com/r/MachineLearning/comments/11i4olx/d_...

I'll let others chime in but you could still probably build something really powerful within your budget that is able to run various AI tasks.

I've seen it said that newsfeeds/ads/etc. feed you what they think you will engage with, so you may want to wonder why you're seeing that type of content. I've never seen anything of the sort on any large tech platform, and I'm probably in an appropriate demographic to be recommended that stuff.

Go with PHP 3 years ago

For "Advanced" Web Programming, I don't really feel like you're hitting the mark by sticking with PHP. Sure, it works, and will probably get the job done for most web projects any of your students will ever work on, but if you want to get people excited while making them employable, it's important to teach new tools and frameworks. Unless the "Advanced" part is more about the techniques and patterns and less about the language, I think you're doing them a disservice by not branching out. And, of course, you can teach patterns and techniques in any modern language.

I'd expect to see some discussion of async job processing and front-end web frameworks in any advanced web programming course, high-school or college level. Honestly, just teaching the usual react stack with a typical node backend would probably be ideal since JS is approachable, react is still "cool", and you still only need to use one language.

Go with PHP 3 years ago

Exactly how I feel reading this thread, I had no idea PHP has changed so much.

I was curious what kind of range that might have, so I put what you said into chatgpt and asked what the range of a typical car or home stereo would be, and it gave me this (not sure if it's correct). FWIW, much less than 20 miles, haha.

-- The maximum power output of a personal FM transmitter allowed by the FCC is 250 microvolts per meter at a distance of 3 meters. The range of the transmitter depends on various factors such as terrain, obstructions, and interference.

Assuming ideal conditions, such as no obstructions or interference, the range of the transmitter can be calculated using the inverse square law. This law states that the strength of a signal decreases with the square of the distance from the source.

At a distance of 3 meters, the signal strength would be 250 microvolts per meter. At a distance of 6 meters, the signal strength would be 62.5 microvolts per meter (250/4). At a distance of 9 meters, the signal strength would be 27.8 microvolts per meter (250/9).

Typical car and household stereos have a sensitivity of about 2 microvolts per meter. Using this sensitivity value, we can calculate the range of the transmitter for these devices.

For a car stereo, the transmitter would have a range of about 26 meters (square root of 250/2). For a household stereo, the transmitter would have a range of about 63 meters (square root of 250/0.5).

However, in reality, the actual range of the transmitter may be shorter due to various factors such as interference and obstructions.

Epic/Cerner/SAP may be CRUD apps with clunky and outdated interfaces, but I wouldn't classify them as basic. Those applications are massive and have a ton of legacy code to connect different things. I'd suspect much of the rest of their staying power does lie in the company's scale and relationships, as well as their domain knowledge. It would cost massive amounts to build a viable competitor to any of them, and you'd need people who understood the problem space well enough to know what code to write. Doesn't matter if it's just a basic CRUD app built on top of a standard RDBMS, if you don't know what features are needed.

As if CS is the only major in jeopardy of this? I predict the accountants and admin staff etc. will be replaced long before the people who build the systems that replace them.

I loveeee fd! About the only time I reach for find is if I need to do something with printf.

I’ve noticed a bunch of CLI tools recently released written in rust that are along this same line of being snappy and well-written. Fclones, ripgrep, paru, fd, exa, to name a few. This probably has more to do with the type of developers the rust platform attracts, rather than the language itself (many awesome tools have been written in go recently as well). But yea, devs who have an interest in Linux and command line tools tend to be great IMO :)

On 1 - I've worked at startups using Django ORM and banking companies using MSSQL stored procs. I don't understand why anyone would ever go the stored proc/raw SQL way unless they absolutely needed the performance. And if you do need the performance, you can always dip down to that level from whatever ORM you are using.

Most of the queries I've done using Django can be optimized at the application code level to be fast and efficient without even touching SQL. There were a few instances at the two Django shops I've worked where we optimized one or two queries by writing raw SQL, but the number of times I've seen that in a codebase can be counted on one hand.

The SQL/stored proc method, on the other hand, doesn't come with any way to do migrations or version your database by default (AFAIK). So now you have to write migration code and come up with some kind of versioning system by hand.

Wish I had more experience with SQLAlchemy/Alembic. I've tried using it on little things here and there but since I've always known Django, that's what I usually go with.

Correct. And most people back then were just using `pip install -r requirements.txt`, including different files for dev/test/prod as needed.

I worked at one company that used buildout back then, which seemed relatively rare, but buildout was more flexible and allowed you to do things like installing system packages or running your own scripts. We used it to pull down config files that weren't checked into the repo but still wanted to be shared, helping setup the local developer environment, and a few other things.

So, the project you linked has a pyproject.toml file uses flit:

    requires = ["flit_core >=3.2,<4"]
    build-backend = "flit_core.buildapi"
Python.org defaults to using hatchling in the docs[1].

PyPA has a sample repository using setuptools[2]. This project is linked from Python.org on this page.[3]

Python.org recommends using setuptools under packaging recommendations as well, with no mention of hatchling or flit even on that page.[4]

No wonder so many devs are frustrated about this. I've been writing mostly Python for work and fun the past 11 years and I'm f*cking confused what tools to use. When I start a new side project I don't know whether a tool is going to exist and still work in a few years, because there's 10 tools trying to do the same things and it's not clear what the community is actually getting behind.

[1] https://packaging.python.org/en/latest/tutorials/packaging-p...

[2] https://github.com/pypa/sampleproject/blob/main/pyproject.to...

[3] https://packaging.python.org/en/latest/guides/distributing-p...

[4] https://packaging.python.org/en/latest/guides/tool-recommend...

Why can’t Python pick one tool?

Sometimes I wonder if developers are just making new tools out of self-interest and they want their name on some well-known project, and that's why they don't just work with one of the existing projects to implement their ideas and move the overall community towards a common working model.

what is the harm in having multiple competing solutions?

Developer confusion and community fragmentation.

Today I was preparing a minimal project for something I needed to share with someone else. I wasn’t sure what tools they would already have installed, so I checked out Python’s official packaging docs and browsed around.

One page defaulted to giving instructions by default using “hatch”, while another page says the official recommendation is setuptools with a setup.cfg and only dynamic things declared in setup.py. Meanwhile, pyproject.toml support is being pushed elsewhere and in beta support for a lot of setup tools features.

There’s way too many tools and too much confusion around which ones to use and which ones are the best to choose going forward. Why can’t we just be like Rust and have one tool that builds and formats and runs tests and everything else?

Pipenv is crap but it’s somehow gained support of the PyCQA, meanwhile I’m not sure if poetry is even mentioned by the Python docs or CQA but it’s the one I’ve been using and it seems great, but I don’t even know if I’ve made the right choice anymore by using that.

All of this fragmentation just leads to developer confusion, newbies and people who have been using the language 10+ years alike.

YouTube Addiction 4 years ago

Can they prescribe non-stimulant ADHD medications? I imagine those are less-strictly regulated.

My previous psychiatrist said he's had some luck with patients on stimulants lowering their stimulant doses and adding a non-stimulant treatment like Strattera, but his patients rarely had success stopping all stimulants and taking only Strattera. That's just one docs opinion, but having been treated for adhd for 15 years, it doesn't surprise me.

So, consider yourself lucky you don't already need stimulants to get by. Some of the newer non-stimulant options may be effective for you, and you won't have to deal with the "druggy" aspect of being on stimulants for work. Stimulants can seriously affect your life, both positively and negatively. You might be able to get things done that you never would have done before - I felt like I was finally able to compete at a normal level when I started - but you might retreat from society at the same time, be less interested in spending time with loved ones or building relationships, and then there's all the short-term side-effects like trouble sleeping or losing interest in eating.

Basically my experience has been a double-edged sword and it's bittersweet. For every way that it's benefited me, ADHD meds negatively affect me in some other way and it's hard to quantify the net balance.

YouTube Addiction 4 years ago

I don't know if I would call it an addiction, but I feel very similar in the sense that I spend a ton of hours on the internet and tinkering with technology.

I did take a break. A long break. I joined the Army in 2021, after being laid off during the pandemic, thinking I wanted to leave technology for good. Then after I graduated from basic, I realized I was probably going to be a shitty, unfit soldier and that I missed all of the interesting technical and engineering challenges we solve as software engineers.

I'm still working on getting back into the profession (pretty much due to my own laziness the past year... I guess needed time to recalibrate after everything). But, I have spent countless hours the past year setting up homelab equipment, various servers, writing scripts and small programs to organize stuff.

Youtube isn't something I really could get addicted to, because I don't like learning from videos or watching stuff I could read in a quarter of the time. But I guess I do have a pretty bad TV addiction. I wasted tons of hours when I was depressed binge-watching shows online. It's to the point I don't even watch movies often because I prefer the intimacy I feel when I know the characters well and am deeply immersed in a series, especially something running multiple seasons. I binged all 5 seasons of the Handmaid's Tale a few weeks ago in less than a week, for example, and considered immediately rewatching them all.

As another has stated below, I guess this is to fill the void that occurs in life when we are single and childless, unemployed, or both.

I still don't think if I would call my internet usage or passion for technology "addiction". The TV/Netflix/etc. ... sure. That's fair. But I think it's fine to be obsessed with something like programming, especially if it's your profession. People who get paid to do something they love are lucky.

CDC File Transfer 4 years ago

What planet have you been living on? Bittorrent is widely used to distribute copyrighted material - movies, TV shows, games, programs, porn... I'd imagine a large majority of bittorrent traffic worldwide is pirated material, with a small portion being datasets as you describe, and other legally-shared data like actual Linux distros, etc.

That's cool, but if the 100 year old saw had been used regularly it would have required maintenance and sharpening to continue working well. Software also requires maintenance.

I can't think of any 100-year old software that is being used today (ha-ha).

I'm sure some airline reservation systems and banking systems written in COBOL in the 70s are still around, but they all have ongoing maintenance to keep them working correctly.

The commenter's complaint seems particularly worse with dynamic languages like JavaScript and Python than compiled things. Old projects written in node are often just as hard to get running or installed as something written in Python 2. The dependencies are out of date, you have to install an older version of Node.js, or the dependencies just don't exist anymore. And JS stuff usually generates a huge tree of dependencies even if they only directly rely on a handful of packages.

End of story, I think if these Python-2 tools/scripts were such a huge part of his project that they keep breaking builds, the company should be invest time in either rewriting them in their language of choice or maintaining those projects or a fork of those projects.

One of my old bosses was strict about this - no COMPANY projects should be relying on external package repositories, unapproved third-party dependencies, definitely not some github project maintained by only a few people. Yeah, I think if your company is relying on "requests" or some other massively popular project with tons of community maintenance, you don't want to fork that and it's important to use the standard versions. But if you're bringing in something that is used and maintained by only a few people - you either need to become part of the community that maintains it publicly or fork the project and maintain your own version.

This isn't NIH syndrome, it's basic protocol for keeping your builds reliable and dependency management simple.

It's rare, but I've run into packages that don't install easily with pip, due to not having binaries for a specific Python version + platform (something like this one where the combinations of Python+platform+MacOS version are limited, for example - https://pypi.org/project/virgil-crypto-lib/#files ).

Also there are probably tons of "packages" which were never published officially to pypi but exist on github, that people have made public but decided not to maintain.

I’ve almost finished reading through your entire original thread from a month ago, because I’m kind of in the same boat as you.

Why do you decline nearly every piece of advice the community here offers? It seems like each time someone makes a suggestion, you come up with a reason why their advice doesn’t work for you.

I’m just pointing this out because otherwise you seem well-spoken and eager to find work, but perhaps you are making things harder on yourself by being inflexible.

Anyways, good luck with the search, I don’t really have any tips but stop calling yourself a mediocre developer and talking poorly about yourself. You may be just as good of a developer and just as smart as anyone at some big tech company, but the other guy had opportunities you didn’t get which led to his success.

This question reminds me of something I read in the below article. In short, overcoming fear of death is thought to be one of the steps taken on the mental journey towards suicide. Fearing death keeps us alive.

https://blogs.scientificamerican.com/bering-in-mind/being-su...

Step 6: Disinhibition

We’ve now set the mental stage, but it is of course the final act that separates suicidal ideation from an actual suicide. Baumeister speculates that behavioral disinhibition, which is required to overcome the intrinsic fear of causing oneself pain through death, not to mention the anticipated suffering of loved ones left behind to grieve, is another consequence of cognitive deconstruction. This is because it disallows the high-level abstractions (reflecting on the inherent “wrongness” of suicide, how others will feel, even concerns about self-preservation) that, under normal conditions, keep us alive.

For that sales report, that runs once a month, and takes 10 minutes, but could likely easily be optimised to run in 2 minutes, the trade off is less obvious. Keeping the report easy-to-maintain is a valuable long-term benefit.

I did this before, actually, and it was worth it for the client wondering why their report took 30 minutes to generate. The particular instance I'm thinking of was a poorly written SQL proc, which I improved upon to reduce the report generating time down to <10 seconds, and it took a couple of days of work to rewrite the original developers work. If I were a better SQL developer that would have been much less.

Another case of optimization required much less effort, I literally went in and switched the library used to generate a PDF from HTML and improved performance 100x. I don't remember the original tool used, but wkhtmltopdf was probably the better performing one.

Man, a lot more goes into syncing the subtitles than I thought.

I recently tried using bazarr to auto-sync subtitles, thinking that for some reason the autosync would improve things, even though I usually didn't have any problems. Well, after that, all my subtitles were horribly out of sync. FFsubsync did not work as magically as I expected. I ended up just resetting them all to their original versions and disabling automatic subtitle synchronization, which I will only attempt to use if the subs are out of sync for some reason.

Note that I did not use ffsubsync directly, but IIRC that is what bazarr uses behind the scenes when "sync subtitles based on audio file instead of embedded subtitles" is checked.

Yea I don't understand all the recent hate over their new version. I installed the new version on my devices, and while the keyboard shortcuts seemed to change, once I looked them up it worked better than before. I just use the cmd+ shift+space shortcut for everything now.

So, I just did this recently. This is an ok article for beginners. I’d hesitate to even mention l2arc or slog devices to someone that isn’t an experienced technical user, though, as they will probably go buy the wrong drives and may not even need the added complexity. I’m not using them and I see high write and read speeds from a zpool with 2x2 mirrored vdevs (wd reds).

If the hardware is remotely capable I’d probably advise running proxmox and spinning up a turnkey Linux fileserver container with bind mounts to the underlying zfs filesystem to use as the main samba share manager. This makes it easier for less technical people to manage the users and permissions and stuff with a web gui. I had some trouble getting zfs sambasharing to work with sharesmb=on (not sure where those configs are stored on proxmox, and if it can do everything samba normally can), but you can try that route to or use sharenfs to set up NFS shares.

There are a bunch of options for ACLs in zfs you probably want turned on , acltype and aclmode, and xattr=sa. Also case sensitivity and the case normalization stuff. And atime=off. Does anyone ever actually use access time because I can’t think of any use case for that on my nas!?

To go beyond chmod, you probably want to learn about setfacl and getfacl and set some sane ACLs so your folders and files are created with the correct permissions. If you are sharing stuff with other users, this becomes a problem real quick unless you’ve got the ACLs set right and things get created with 775/664 perms. I like to also set chmod g+s so the default group of anything is the group of the parent, not the current users primary group.

Lastly, if you’re on zfs you can setup something like sanoid to automate snapshots. I just did that, hopefully it will save me next time I run rm -rf against the wrong folder by accident!

Idk. I’ve worked with tools like he mentioned.

Recently I set up a media server and didn’t want to mess with Ansible to provision the VMs and containers or Kubernetes to manage the configs. I figured I’d be wasting time getting stuck on little devops details when I can just hand-roll everything once and make a backup. Well, it’s been a couple of weeks and I’m still making changes here and there - and there’s no infrastructure in place to rebuild it from a clean slate. That’s ok, I guess for home use, but it doesn’t feel ideal.

I had another project which was a server+iOS app which got canceled and I wanted to rebuild it recently. There wasn’t any of this automatic infrastructure in place anymore, well, it wasn’t open source so I’m not sure if I could have even done it like that on GitHub. But yeah, when I pulled it down it was nearly impossible to run without changes and adaptations to the code in order to get 2018 code (and dependencies) running on 2020+ systems and language versions, and building in XCode. Actually the easiest way to build the iOS app seemed to be to use a machine with Catalina still installed and an older version of XCode. I’m sure you’ve all been there before.

Anyways, yeah, it feels like a headache to pile on a bunch of best practices and “infrastructure” anytime I want to do something with code, whether that’s write a small web service or a script that runs on laptops. But, if you make it a part of your daily process, and you have a repeatable way to init new projects quickly with identical tooling, maybe the tools get out of your way and you can ultimately be more productive and ship more reliable code? I think that’s what the author is getting at.