HNHacker News
TopNewBestAskShowJobs

ghh

268 karma · joined August 15, 2012

[ my public key: https://keybase.io/georghendrik; my proof: https://keybase.io/georghendrik/sigs/0KWs6pJJ_by4W3TWfDD6EAnkJ950loX7c7qNcr8kIVA ]
submissionscomments
ghh··on I gave up on self-hosted Sentry (2024)
This isn't okay - the author is selling their own alternative to Sentry, 'reusing' Sentry's open-source client SDK's, while spreading FUD about self-hosting Sentry.

I've been self-hosting Sentry for over 10 years: Sentry is installed by running `git clone`, editing one or two configuration files, and running ./install.sh. It requires 16GB RAM if you enable the full feature set. That includes automatically recording user sessions on web or mobile for replay, and support for end-to-end tracing (so seeing which database queries your api asks for in response to a button tap in your mobile app).

Sentry has a wonderful self-hosting team that's working hard to make Sentry's commercial feature set available, for free, to everyone that needs a mature error tracking solution. You can talk to them on discord and they listen and help.

ghh··on Scsh Acknowledgements (1994)
I had to look up if he's ok, three decades later. It appears so: https://www.khoury.northeastern.edu/people/olin-shivers/ and https://www.ratemyprofessors.com/professor/923911.
ghh··on Data Science Agent and Code Transformation
Wow, their example to "clean up the code" does a bit more than just refactoring to make code more readable, it appears to change the output.

One would have to check the resulting code carefully to see if the meaning is still as originally intended, or replaced with code that is more probable to be correct (but no longer working).

For instance, it replaces this:

  if dataset == 'animals':
    if dataset == 'turtle':
      x_train, y_train, x_test, y_test = datasets.load_turtles(with_bowtie=False)
    elif dataset = 'formal_turtle':
      x_train, y_train, x_test, y_test = datasets.load_turtles(with_bowtie=True)
  else:
with this:

  if dataset == 'turtle':
      x_train, y_train, x_test, y_test = datasets.load_turtles(with_bowtie=False)
  elif dataset == 'formal_turtle':
      x_train, y_train, x_test, y_test = datasets.load_turtles(with_bowtie=True)

The before-code responds to dataset='animals' with `load_turtles(...)` and to dataset='turtle' or 'formal_turtle' with an error; In the after-code this is reversed, although the apparent logic error and the assignment/equals sign error are resolved.
ghh··on Zed AI
For those that want to try it, and have a rust development environment installed, the following runs Zed on Windows. (The editor part at least, I haven't tried the collaborative functions).

  git clone https://github.com/zed-industries/zed
  cargo run --release
ghh··on Ask HN: What are good self hosted time tracking software for consultants?
Yes, see ManicTime [0], Timing [1] and ActivityWatch [2] for that.

They passively record what you do, on computer and phone, and at the end of the day (or when invoicing is due) allow you to link what you did to projects.

Use ManicTime if you're mostly on Windows, Timing appears to be good if you're mostly on OS X, and ActivityWatch takes the same approach in an open-source cross-platform project.

I have ManicTime set to record a screenshot every 15 seconds, and record window title and document paths on every app switch. Invoicing still takes time, but knowing what you did and when helps to take all the guesswork out of it, especially for chaotic days.

[0] https://www.manictime.com/ [1] https://timingapp.com/ [2] https://activitywatch.net/

ghh··on Ask HN: What are good self hosted time tracking software for consultants?
ManicTime [0] passively records your computer and phone activity in minute detail.

This makes it great for consultants, i.e. people working for multiple clients every day. You can focus on making your clients happy, and at the end of the day (or week, or month), still accurately assign time spent on each project.

ManicTime:

  - Takes a screenshot every X seconds,
  - Records window titles, document paths, urls,
  - Records phone call metadata, phone location, foreground phone app (Android only).
ManicTime has a very intuitive zoomable timeline interface to assign screenshots and other recorded activity to projects. Everything is stored offline. If you want, a free to use self-hosted server ManicTime server helps with backup and multi-device synchronisation.

ManicTime works best on Windows and with Android, although an OS X client exists.

Pricing: 67 USD for a one year license (so: no subscription that holds your data hostage). ManicTime is not free, but knowing what you did and when (down to the minute) gives it a quick ROI.

[0] https://www.manictime.com/

ghh··on Migrating Away from Google Analytics
PostHog Analytics [1] is open source, and sofar a very nice alternative (or complement) to Google Analytics.

It's more like Heap Analytics, in that it collects user clicks and other events from your site (or app) and allows you to retro-actively define "actions" based on these events.

For instance, if you decide today to keep track of how many users click your sign-up button on page X, PostHog can graph this metric for you for every moment since you first installed it on your site.

You can combine actions into funnels, graph nearly everything, the GDPR support is first-class, there's support for heatmaps, feature flags (rolling out new features to just a percentage of your visitors), and user cohort analysis.

[1] https://posthog.com/

ghh··on MeiliSearch: Zero-config alternative to Elasticsearch, made in Rust
I wanted to mention Sonic [1] as another lightweight document indexing alternative written in rust, when I found MeiliSearch to provide a thoughtful comparison page [2]

[1] https://github.com/valeriansaliou/sonic

[2] https://docs.meilisearch.com/resources/comparison_to_alterna...

ghh··on PopSQL – Modern, collaborative SQL editor for your team
Other solutions in the `write sql and share the graphs with your team`-space:

- ChartIO

- 'WagonHQ, Modern SQL Editor' [1] (now aquired by Box)

- MetaBase [2,3]

- Redash [4]

MetaBase is the only one that I know of that is

- fully open source,

- mature (graphing options, permission model),

- still actively maintained, and

- both friendly to non-technical users and expert sql'ers alike

[1] https://news.ycombinator.com/item?id=9792464

[2] http://www.metabase.com [3] https://news.ycombinator.com/item?id=10425959

[4] https://redash.io

ghh··on Firefox Focus – A new private browser for iOS and Android
Focus does not seem to erase your history in a way you may expect. Try this on Android:

- Erase your history.

- Go to HN, click any link you haven't clicked before.

- Wait for it to load.

- Erase your history. Make sure you see the notification "Your browsing history has been erased".

- Go to HN again, and see the link you've just clicked still highlighted as 'visited'.

ghh··on FBI says foreign hackers penetrated state election systems
It's about preventing easy scaling of voting fraud. To corrupt vote counting at multiple precincts when using a paper-based, manual counting system, requires the bribing of a lot of people in different locations, and is hard to keep quiet and go unnoticed the larger it gets. Using a digital voting system, if the software or firmware of any part of the voting process is compromisable, likely no-one will be able to tell, any many precincts affected.
ghh··on Migrating a 10,000-line legacy JavaScript codebase to TypeScript
Most development setups have a way to do a regex search through a codebase; You'd be looking for declare type.*any
ghh··on Migrating a 10,000-line legacy JavaScript codebase to TypeScript
This is kind of a random Typescript tip, but when migrating regular Javascript, there is an alternative to adding the type 'any' to every object to 'silence' the compiler.

That is to introduce a preliminary type definition. Instead of:

  const oldVar: any = { field: 1, ... }
  function foo(bar: any) { ... }
You can write:

  declare type OldVarType = any

  const oldVar: OldVarType = { field: 1, ... }
  function foo(bar: OldVarType) { ... }
This way, you can signal that it's not just any kind of any, but a particular kind of any, which is now trackable in your codebase.

When you're ready, you can gradually update the OldVarType declaration and solve the compiler type check warnings from there. Union types [1] can be quite useful then too.

[1] https://www.typescriptlang.org/docs/handbook/advanced-types....

ghh··on Inferno: A fast, React-like JavaScript library for building UIs
Being able to run the same code both on the server side (nodejs) and the client side (browsers).
ghh··on Canada 150 Typeface
Does this font feel Canadian to Canadians?

The Dutch government also has its 'own' typeface [1,2], used on everything from the official weather reports to tax forms and road signs. Dutch people recognize anything written in it as something meant to be taken seriously.

[1] https://www.rijkshuisstijl.nl/bouwstenen/lettertype

[2] http://designworkplan.com/typography-fonts/rijksoverheid-san...

ghh··on Ask HN: Who's your role model?
Fabrice Bellard [1,2] should be on this list. Author of QEMU and FFMPEG among other open source projects that have been useful to a lot of people. Also, author of jslinux [3].

[1] http://bellard.org/

[2] http://en.wikipedia.org/wiki/Fabrice_Bellard

[3] http://bellard.org/jslinux/

ghh··on 8-bit maps of world cities
Fun to see, familiar and new at the same time as intended.

For the Amsterdam map there appears to be a large part of what I know is water that is rendered green? Why is that?

ghh··on The largest and most effective bicycle registry ever
In Holland, there's a national stolen bike registry too, and an ecosystem with bike dealers and police participating in it.

- It's hosted by the government - the equivalent of the DMV [1]

- It's based on RFID tags placed INSIDE the frame, so serial numbers can't be filed or welded off. You have to physically destroy part of the frame to get to the tag.

- Tags are installed by bike manufacturers on the more expensive theft-prone bikes, and registered by the bike dealer, so you yourself don't have to do any registering.

- Police have scanners that they use to scan public bike parking lots randomly [2]. Try google image search for 'amsterdam centraal fietsenstalling' for a picture of a parking lot.

[1] https://fdr.rdw.nl/ [2] https://translate.google.nl/translate?sl=nl&tl=en&js=y&prev=...

ghh··on Netherlands bans illegal downloading
He means 'being illegaly there', i.e. being an illegal immigrant. This was part of a recent political debate; it was reconfirmed as not being punishable. It would have affected mostly individuals that are also banned from entering their homeland, and are ping-ponged back to the Netherlands.
ghh··on Naur’s “Programming as Theory Building” (2011)
So Naur is saying that programming helps programmers understand how software can solve the problem at hand, and that this is more important than the resulting code.

I might be reading this the wrong way, but this helps explain the Not-Invented-Here syndrome [1]. Why not just re-use some other code? Because it's not just about the code, but about the programming team's understanding of how the software tackles the problem.

[1] http://en.wikipedia.org/wiki/Not_invented_here

ghh··on Ask HN: Do you have any code currently in production that you're ashamed of?
Yes! Please refer to the image at [1]. It's also on the cover of the introduction of 'Clean Code' [2]. Everyone here has some code that they are not proud of. You should see it as a sign that you've learned from the experience of designing and developing it.

Want to steadily improve on non-production code? Try codewars.com: you're asked to solve 5-30min coding exercises and after can immediately browse the solutions of your peers. The short feedback loop helps you understand how you could've improved while the code is still fresh in your head.

[1] http://www.osnews.com/story/19266/WTFs_m

[2] http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...

ghh··on Ask HN: How to find part-time developer work?
If the other party agrees to it, any contract is possible. However, in this case you get more money if somehow the project is delayed over the three month period; so you have an incentive to work slowly or to have the project creep up in scope. That's not a good basis for a contract for your client may complain that you should've worked faster, even if you've put in all-nighters. Given a fixed price, it's easier on the relationship to have the fixed price be renegotiated on basis of objective measurements that you used to arrive at the fixed price in the first place. Examples are the number of pages in a site or screens in an app, the number of revisions of the visual design, or the number of function points [1] if you have data available for that. Mention in the contract that if a client wants more than X screens, Y pages, or Z revisions, the fixed price is to be recalculated.

[1] http://en.wikipedia.org/wiki/Function_point

ghh··on Bitrot and atomic COWs: Inside “next-gen” filesystems
Microsoft has introduced ReFS [1] as a potential successor to NTFS in Windows Server 2012. It has a few of the 'next-gen' filesystem features that the article mentions, such as integrity checking, but no copy-on-write and it's not feature-equivalent to NTFS yet. Also, you can't boot from it yet.

[1] http://en.wikipedia.org/wiki/ReFS

ghh··on Developer and Power Users Tool List for Windows
IMDisk, a virtual disk driver and disk image mount utility that is lightweight, ad-free, and actually supports Windows 2000 to 8.1 [1]. It's also open-source.

[1] http://www.ltr-data.se/opencode.html/

ghh··on Gravity Battery Concept
GravityLight[1] applied this concept at small scale: to power a white led in e.g. rural areas without power, a bag of dirt is suspended from a dynamo.

[1] http://www.indiegogo.com/projects/gravitylight-lighting-for-...

ghh··on Hacker sends this through the mail to record a video of the process
The authors contact page [1] mentions a Dutch mobile phone number, but the stamp [2] clearly shows Post Danmark was used in transport.

[1] http://rubenvandervleuten.com/contact.html [2] http://rubenvandervleuten.com/AtoB1.jpg

ghh··on 100,000 DOM Updates
Isn't this 100x100 = 10,000 updates?
ghh··on Java running faster than C (2007)
This text is from 2007, and compares execution speed of Java to C on one single CPU-bound benchmark.

At http://shootout.alioth.debian.org/, an up-to-date list of the most popular languages are benchmarked. Tests are standardized, and code is optimized for the tested language and particular benchmark. Also, for each benchmark, not only execution speed, but also memory consumption and code size are measured, and the processor architecture is taken into account too.