HN user

ghh

268 karma

[ my public key: https://keybase.io/georghendrik; my proof: https://keybase.io/georghendrik/sigs/0KWs6pJJ_by4W3TWfDD6EAnkJ950loX7c7qNcr8kIVA ]

Posts2
Comments28
View on HN

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.

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.
Zed AI 2 years ago

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

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/

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/

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/

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

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'.

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.

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....

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?

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=...

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.

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

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...

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

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.