HNHacker News
TopNewBestAskShowJobs

powersurge360

293 karma · joined February 18, 2012

submissionscomments
powersurge360··on I spent two years trying to do what Backstage does for free
It's org mode in emacs with the org-roam plugin. If I wasn't using emacs I would probably have a folder full of markdown files instead and leverage a project-based grep to search it. The real power in the system is that it's close to your editor and personal so you can iteratively build up your knowledge.

In particular, every GitHub wiki belonging to an organization or a public project itself is a git repo of markdown files that you can clone and commit to. I probably would use that for per project documentation w/ a separate folder for managing broader notes. I think it's important to separate the markdown from a project's code because otherwise you can have important markdown updates trapped in a branch that hasn't been merged yet and because git works by line rather than by word you can get into complicated merge conflicts by features that touch similar business concepts.

Org mode happens to add some niceties on top in that you can have an example code block (roughly comparable to a triple back-tick code block in markdown) that also can be executed. The example code block can take some arguments like what interpreter to use and will paste the output into another code block underneath the source code block.

Because org mode is also used for organizing tasks it is easy to use it as a scratch pad as you grind through tasks and if something turns out to be useful you can promote it to a top level note (or org-roam node). And even if it's not obvious that it's a note candidate, just thinking through problems 'out loud' in org means you can search and find it later when the same or an adjacent problem comes up.

Another favorite feature I like in org mode is that in any code at any time I can tap out 'SPC n l' and it will capture a reference to the file and the line in the file and allow me to link to it in my notes. It doesn't capture by line number but by copying the literal line, which means that as feature updates push the line number up and down, it still will be able to find exactly the right file in exactly the right line as long as the line's content hasn't changed. It also serves as a rather nice canary because if the docs link to a line that no longer exists, then the documentation has probably gone stale.

The last major win with org mode vs markdown is with org-roam, which borrows the ideas from the standalone program Roam Research (which also is very similar to notion). Every 'node' you make initially is a file and you can fill it in as a wiki type structure. Everything is flat on the filesystem and has a unique id prepended to it so you can't overwrite it with another node of the same name. There's also a UUID associated with each node so if you move from one place to another, none of the links need to be updated. Contrast that with a regular wiki or markdown where when you move a file to a new folder you either have to leave a redirect behind or go through and update all of the back links.

You can also start a node as a subheading and later on promote it to a full file with all the backlinks still working correctly.

I started using org mode years ago with spacemacs, got frustrated with spacemacs, and gave up until earlier this year when I found doom emacs and gave it another spin. I wish I had a better recommendation for an alternative but after looking for 4-5 years for something as good as org mode, I could never find anything. Notion seems like a popular alternative but there's also a lot of shiny bells and whistles in it that can cause 'productivity procrastination' where you spend time configuring and turning knobs instead of actually using the system. Ironically, the second best tool I found was plain pen and paper using a minimal bullet journal technique and taking special care to do indexing. Of course, you can't share plain pen and paper in that way, but the name of the game for personal use is low friction and ready access. The better a system scores on those two in term of note-taking the more useful it will be.

powersurge360··on I spent two years trying to do what Backstage does for free
I am becoming increasingly skeptical that good internal documentation is even possible. I've been working in software development for around 12 years and have _never_ seen it done well and asking around the best I've heard offered up is the equivalent of an internal stack overflow.

For a while, I thought that maybe an exception would be having a technical writer on staff but after reading this post I'm significantly disheartened on that front too. I'd be interested to hear if anyone on hacker news has experienced good internal documentation and even more interested if any of you folks have experienced anything truly _great_.

For my contribution, I've found that documentation fails for a couple of reasons. The first is the burden of correctness. The people who most would like documentation are also the people who most need the documentation and they usually are also the people most likely to be reluctant to contribute to the documentation because they don't feel they can accurately represent the information. Imagine someone ramping into a feature and spending a few days reverse engineering how it works, collecting info, etc. Sometimes they'll put it up somewhere but a lot of the time contributing partial information feels 'wrong'.

And the second bit I find to be a big reason why documentation efforts fail is just the sheer friction of putting it into the documentation store to begin with. In confluence, for example, if you have a bit of information it can be tough to work out how to categorize it, where in the hierarchy it should go, etc, etc. Or if it's a GitHub wiki you want to put it somewhere that it is discoverable but also be careful that it's 'correct' because you don't want to break backlinks if it gets recategorized.

I've mostly given up on it at this point. Instead, I take detailed personal notes and make them publicly available. It doesn't have to be correct because being advertised as personal notes means that it's my opinion on the truth rather than objective fact. It isn't far away from my codebase, I can just tap a short keybinding in my editor to type my notes or search them and I can link directly from the notes to lines of code in files to jump back and forth. The particular system I use means that if I write a short snippet of code to solve a one off issue (like calling a path helper to derive a URL that I can't find in the interface) I can even drop it in a code block and execute it right from my note-taking tool. It isn't ideal for sure but I've gotten way farther in having a shareable knowledge base this way than I have in literal years of trying to get a shared, useful documentation store spun up.

powersurge360··on An Apple Watch for Your 5-Year-Old? More Parents Say Yes
I also have a 9 year old w/ ADHD and tried this with the reminders and he just turns them off lol.

It's been great for other things though. Facilitating social connections w/ friends (the cellular watch gets its own number) and the walkie talkie feature is awesome for when he needs to quickly check in for an opinion or if I need for him to come home and don't want to stand on my back porch and yell generally into the neighborhood like a maniac. There even was a mildly scary time this summer where his summer camp called us and said they wanted to confirm we got him early (we hadn't). We were able to shoot them a screenshot of his location data and politely ask them to get it together and they found him swinging on a tire swing at the edge of the camp.

powersurge360··on Elixir Livebook now as a desktop app
I know linux is a future supported platform but as far as I'm aware, there's not a clear unified way to build bundles in this way across linux distributions. What kind of things are you folks considering if you don't mind my curiosity.
powersurge360··on Elixir Livebook now as a desktop app
I know this is a Livebook love-fest, but you may also consider setting up org-mode sometime. There's a lot to love about org-mode but to stay on subject, you can write your documents in a plain text syntax akin to markdown and any of the code blocks that you add in as examples are _executable_. And you can take the output from one and pipe to another.

At work, for example, we have to hit a remote API and the secrets are stored in AWS secrets manager. I have some documentation that has a block describing how to get the secrets and some other documentation elsewhere describing how to issue a post request and I can pipe the output from one block into another and receive the output either in the same file or put it somewhere else.

The one downside with this extreme flexibility is I sometimes catch myself squirreling away useful functionality in my own notes instead of adding it in a utility CLI or similar where it can be shared with the team.

If having access to a scripting language is duct tape, piping output from one script to another in this way in a single file is like having inter-dimensional duct tape.

powersurge360··on Elixir Livebook now as a desktop app
Thanks for linking this. I was interested in how it worked but I didn't know enough elixir to get around the codebase by myself. This entry point is very informative for how they managed to do it.

I just looked at the macOS part, but the tl;dr for that is they seem to have compiled the elixir program into a binary and wrote enough swift to manage the lifecycle of the elixir program and signed it and notarized it and prepared it for shipment using CLI via shell! invocations. I didn't look at the windows way of doing things but I imagine it's similar.

powersurge360··on Elixir Livebook now as a desktop app
I, too, am interested but I'm not terribly literate in elixir yet. I am aware that you can compile executables in elixir with a release command but I'd be curious to hear more about (or at least be pointed to the specific spots in the code) how the bundling was done to give you a discrete application per platform, with app icon and everything.

Having a script that opens a web browser pages is simple enough, but the extra sugar on top to wrap in an app bundle that shows up in your task bar or dock is something I am very curious about.

EDIT: Someone further down the thread linked to a more specific place and that led me to the macos.ex file[1] (which is what I was most interested in, being on macOS myself.

It looks like at least in the case of macOS it will build the bundle by hand, template in enough swift code to build the application, sign and notarize a bundle, and add the compiled elixir program in there. Pretty interesting. I guess the idea is that you write just enough swift to manage the life cycle of the compiled elixir application. It's an interesting approach but it seems like it would be frustrating and fragile.

[1]: https://github.com/livebook-dev/livebook/blob/355527f7e8034e...

powersurge360··on Programming languages endorsed for server-side use at Meta
This is what I had considered to be the state of things. The phrasing on initial read suggested to me that C++ & Rust were the default now for performance critical services (with Rust being a new add) and Hack was used where it made sense but not necessarily by default anymore. I think I may have discounted Hack's role too much.
powersurge360··on Programming languages endorsed for server-side use at Meta
I'm very surprised that C++ is one of the recommended languages for backend services. I occasionally am interested in learning C++ but with my context as a web developer I find it doesn't really fit any of my use cases.

How would one go about building a rest service in C++? Do you have to write everything yourself or are there libraries and frameworks. I did some light looking into it after reading the article but I would love to hear from folks who actually do it and what the state of the art is for C++ web services.

powersurge360··on Why we're sticking with Ruby on Rails
Hey there! I've done a lot more Django than I've done rails, but have had both in my job title at different points in my career. My favorite language is python but my favorite development platform is Rails. They're mostly comparable but Rails wins for me. Rather than type it all out in prose I'll just give a short little blurb about what you get and don't get with one and leave the rest as an exercise to the reader:

What you get with Django but not with Rails:

- An admin panel out of the box

- Python (which is a big win for me personally)

- Authentication out of the box, but still fairly basic

- A robust library of third party packages that benefits from python being used much broader than the web space.

- Class based views (this is the biggest thing I miss, by _far_)

- Better LSP support

- Django REST framework (rails isn't _quite_ as good but you can get kinda close by leveraging resourceful routing and the serializers that ship with rails)

What you get with Rails but not with Django:

- Websocket support out of the box (but not the greatest performance. A third party drop in replacement [Anycable] makes it much better)

- First party API for background jobs (but it requires a third party background job system to wrap, like sidekiq)

- First party integration of a JS solution (import maps)

- Second party integration of a JS bundler (js-bundling, written by rails authors but not included by default)

- Hotwire (although Django trivially integrates w/ a comparable technology, htmx, Hotwire is still pretty dope)

- Rspec and the rest of the Rails testing ecosystem (guard, VCR, factory_bot, capybara). Python has ports of some but not all.

In my mind, Django adopted just two things, I'd be very happy. I'd love to see a better async story in Django that would enable web sockets and stuff. And the second thing I'd love to see is a better story out of the box for playing nice with frontend build chains. And, as a distant third, I'd like to see an html-over-the-wire technology like HTMX favored and some light integration in Django to recognize some headers so it can switch between sending just template segments or if it should send one w/ the layout included. The testing ecosystem I don't think is possible for Django to lift on it's own and I'm prepared to miss it while I'm away. That other stuff, though, is unfairly aging Django imo.

powersurge360··on State Machines in Ruby: An Introduction
I've been on the receiving and perpetuating end of state machines and it's painful to have to deal with one that started years before you got involved and easy to think that you can do better. I've got a modest one in a side project and due to it being a side project I touch it once every couple of weeks and already it is making me uncomfortable. And it's dirt simple and I wrote it!

There's a take on state machines in a railsconf talk further down in the thread and it seems like an awesome way to reap a lot of the benefits while keeping a grip on the complexity. Sometimes complexity can't be buried safely and you kind of need to frame it instead. I'd argue that state machines bury that complexity but breaking those states into ruby objects w/ their own validation frames and delineates them instead.

powersurge360··on State Machines in Ruby: An Introduction
Thanks for sharing this. For other people who are hovering over this and unsure if they want to watch a 40 minute video, it's time stamped and the two parts I found super valuable were the 'Anti-Pattern: Custom Methods' and the 'Anti-Pattern: State Machines' sections. The TL;DR there is it's alright to create a controller that manipulates a single field on a single model. If it is enough of a resource to expose it by a custom url (think update password) it is enough of a resource to get its own controller.

And going beyond that, to the state machine, if each state (or really, value of a particular field) is important enough to have it's own contextual validation, transition points, etc, then it's important enough to expose each state as a resource with it's own controller.

Super cool stuff and I've got some thinking to do about some side projects now.

powersurge360··on Ask HN: Options for handling state at the edge?
I haven't done this, but I've been thinking about it lately. Fly.IO has had some very interesting ideas on this if you want to use a relational database. There was an article about litestream that would allow you to replicate your SQLite database to an arbitrary number of nodes, which means that every application server would have a SQLite file sitting on it for read queries, and then you can capture write queries and forward them to a write leader and let that user continue talking to that server until it replicates across your application servers.

You can do basically the same idea with any relational database, have a write leader... somewhere and a bunch of read replicas that live close to the edge.

There's also what you would call cloud native data stores that purport to solve the same issue, but I don't know much about how they work because I much prefer working w/ relational databases and most of those are NoSQL. And I haven't had to actually solve the problem yet for work so I also haven't made any compromises yet in how I explore it.

Another interesting way to go might be CockroachDB. It's wire compatible w/ PostgreSQL and supposedly automatically clusters and shares data in the cluster. I don't know very much about it but it seems to be becoming more and more popular and many ORMs seem to have an adapter to support it. May also be worth looking into because if it works as advertised you can get an RBDMS that you can deploy to an arbitrary number of places and then configure to talk to one another and not have to worry about replicating the data or routing correctly to write leaders and all that.

And again, I'm technical, but I haven't solved these problems so consider the above to be a jumping off point and take nothing as gospel.

powersurge360··on Ask HN: Options for handling state at the edge?
Isn't this effectively the same as using a static site generator? Could you potentially freeze or pre-bake your generated files and then just serve that?
powersurge360··on I've used all the notebooks
I am _shocked_ that Midori isn’t more represented in these comments. The lay-flat binding is amazing, the grid is pretty cool, and the indication at the top for the grids is great. Plus the price is about right compared to other premium notebooks.

You miss out on pockets and multiple bookmarks but you can pair it with a Kokuyo systemic notebook cover to cover all the bases.

powersurge360··on In defense of simple architectures
Check out alpinejs or stimulusjs and combine it with htmx to get to a SPA like experience with very little additional complexity! Htmx let’s you serve partials over the wire instead of a page load so you can update the page incrementally and alpine and stimulus are both tools to add JS sprinkles like you’ve described in a way that is unobtrusive.
powersurge360··on Ask HN: Any weird tips for weight loss?
Counter point, I’m work from home and actually spend up to an hour a day doing HIIT and am lucky to break 4k steps. If you’re fidgety or pace you may get there but even with being intentionally active and burning around 850 calories in exercise a day, I’m about half the 8k steps.
powersurge360··on Vue 3 as the New Default
I have been _very_ bullish and excited on LiveView and its cousins from other platforms. Hotwire was the first time it's entered my personal dev world and I've been working on a hobby trivia app since Christmas and it has been an absolute _joy_.

It's obviously not a one to one replacement for an honest to god frontend application, especially one that can be recompiled into an offline capable native app, but where you can use it, it does a lot of lifting.

powersurge360··on I Quit Shopify After Five Months
Web dev seems to be headed in three directions imo:

1) The old style, where the server owns the routing but can cede control over html to the frontend for discreet applications. Always cedes control of JS and CSS to the frontend.

2) A fully separated frontend and backend application that talks to one another over REST or GraphQL

3) A very javascript-light frontend that uses a technology like LiveWire, LiveView, or Hotwire to render on the server but push reactively to the frontend

I think any is fine and each have their merits. I imagine that #3 is the one that is most likely to supersede #1 as it's a direct evolution. But I would think that it's a bit gatekeeping to tell someone whose whole job is HTML templates, javascript, and CSS that they are No True Frontender.

powersurge360··on Ask HN: Who wants to collaborate?
I suspect this might be a tongue in cheek reference to digg, a site that does a very similar thing. It was popular for a while before being eaten alive by Reddit. Don’t let that dissuade you, though, there is room to add a new dimension to it or do things differently.

https://en.wikipedia.org/wiki/Digg

powersurge360··on AirPods don't “just work”
You can do both tbh. Wireless headphones are great because if you charge them relatively frequently, they're a light, painless pack. I'm pretty into high fidelity audio, but I'm not going to be walking around w/ my DT 990 pros. But if I'm out running errands, being able to break out the AirPods is amazing.

And realistically, it's not that significant to just buy an adapter and keep it permanently affixed to your headphones. Will be better if/when apple fully moves off of lightning to usb-c but I have found that when I want a high fidelity experience w/ music I'm more likely to be sitting and plugged in anyways.

powersurge360··on Game Studios Are Turning Play into Work
Likely to be EverQuest
powersurge360··on Game Studios Are Turning Play into Work
I have a lot of friends who play almost exclusively shooters and this kind of stuff is what's put me off of the genre. I really miss back when you could get a copy of unreal tournament or half life deathmatch and just drop in w/ all the guns unlocked and available and just rampage.

I know it's a different genre completely from the more realistic shooters like Battlefield and Call of Duty, but even still I miss the unfettered drop-in fun in those older games and there seem to be hardly any left.

powersurge360··on CDC reports increase in human rabies cases linked to bats in the U.S.
Bats do do a lot of good, but you also can be bitten by a rabid bat without knowing it.

https://www.nytimes.com/1999/03/16/health/cases-a-bat-s-swif...

powersurge360··on [dead]
Refers to Mark Zuckerberg, founder of Facebook
powersurge360··on Samsung remotely disables TVs looted from South African warehouse
South Africa is apparently having large riots and looting going on right now. This video popped up in my YouTube recommendations last week and completely surprised me. I'd tell you more but this video is my only exposure to it so far so I figured I'd just link it than try to say it second hand.

https://www.youtube.com/watch?v=Cew-BnjA_q4

powersurge360··on Apple explicitly asks employees to merge their personal and work accounts
This is a limitation that I haven't really found a way through. I haven't tried too hard though because I've found that I can often just let the complicating set up have the 'plain' github.com host and use the custom host for the other set up. If I found that both professionally and personally I needed submodules, though, I'd probably be in trouble.

Also, if the submodules are public, the plain host will work fine because it doesn't matter what key you authenticate with.

powersurge360··on Apple explicitly asks employees to merge their personal and work accounts
In the example, fnord77 posted, you can replace all the places that they used personal.github.com. It will be usable anywhere you would use ssh, including when going through a few tools that ultimately resolve to an ssh invocation. I won't copy the host block in .ssh/config but you could, for example:

`sshuttle -r my-cloud-server 0/0` for a poor man's vpn

`ssh some-enterprise-server` for when the server has a user unfriendly domain name that you don't want to bother remembering

`git clone git@github-personal:myusername/somerepo.git` when you want to clone using your personal key from GitHub.

There is the caveat, though, that you may have some nested dependencies that will use the plain ole every day host name in which case things will break for you. It rarely comes up, though, in my experience.

powersurge360··on Apple explicitly asks employees to merge their personal and work accounts
The host also doesn’t have to be a “real” host. You could do something like github-personal for example.

Thanks for the assist fnord77!

powersurge360··on Apple explicitly asks employees to merge their personal and work accounts
You can set up a new host in your ssh config and specify a key different from your main account and it should swap your accounts based on the key. Additionally, you can set a git config to be included if you’re in a particular directory so that you can change your commit details.

I’m on a mobile device so excuse the vagueness, but if there’s interest I can provide some resources and go more in depth.

← PreviousPage 2 of 3Next →