Hacker Newsnew | past | comments | ask | show | jobs | submit | more Jakob's commentslogin

I wish all API doc generators test the doc code examples like this https://rust-lang.github.io/mdBook/cli/test.html

Even if the code example works today, it might not in the future and tests prevent people getting stuck on outdated docs like we often see.


I actually wrote a kotlin library (https://github.com/jillesvangurp/kotlin4example) a while ago to help me write documentation that is generated from code that actually compiles and runs.

Instead of embedding code in markdown, I actually generate the markdown from code. Which with Kotlin is easy because you can write your own DSLs. And I get to refactor my code and documentation at the same time. It has some other nifty features like capturing output that you can show in the Markdown and a few other things.

If you want to see it in action, check out the documentation for my kt-search project. There are probably a lot of other libraries out there that do similar things. But it's a thing that most projects don't seem to rely on for their documentation. And breaking code samples are a major hurdle for writing documentation to begin with.

I find that addressing that gets you in a mode where you are documenting things by default. And good documentation also reveals design flaws because you are kind of forced to eat your own dog food by writing working code that shows how you would use a particular feature. I'm basically constantly trying to make life easier for both myself and my users.


Reminds me of Knuth's literate programming: https://www-cs-faculty.stanford.edu/~knuth/lp.html


That was a direct inspiration.


I wrote a ton of custom code to do this for iommi (example: https://docs.iommi.rocks/en/latest/tutorial.html). I went further than any other library I've seen and made it so that the views in the examples produce static html files that are embedded in the resulting output via iframes.


I do that, too. cmd-J as shortcut to enable JavaScript without needing to reload. In my experience once I hardcode which websites I need JavaScript on, browsing becomes painless. And much faster obviously.


Alright but the last time I did this the answer to "which websites I need JavaScript on" was "All of them". Is that still the case.


You don't need all of the javascript for all websites. In my experience, I enable javascript to load from probably 10-20% of domains (using noscript).


How do you set the shortcut? When I press cmd-j the Library in Firefox opens. I have checked "Disbale javascript" in settings in uBO. I guess that setting will be disable for just the site i visit when i click cmd-j?


This shows the keyboard shortcut configuration: https://github.com/gorhill/uBlock/wiki/Keyboard-shortcuts#ac...

The setting is called "Relax blocking mode" and will enable JavaScript (but keep all ad blockers) if JavaScript is disabled by default.

In summary, for Firefox it’s under

  about:addons > gear icon > Manage Extension Shortcuts
and for Chrome you can set it under

  chrome://extensions/shortcuts


As a counter point, I think Singapore is a good example of well-educated, appreciated and well-paid teachers in public and private schools. Even starting at kindergarten. Education is on a different importance level there both for the government and its citizens.

I was surprised to see the relatively high salary in Luxemburg, Germany and Switzerland, too: https://read.oecd-ilibrary.org/education/education-at-a-glan...


Yes that is unfortunate. Safari had the option to toggle JavaScript via Shortcut until recently, but it was removed. The only browser I know which can easily toggle JavaScript now is Brave.

But uBlock Origin has that functionality, too, and I guess most people who would care about JavaScript have that already enabled anyways.

The web is so much nicer without JavaScript but easily activating it (via cmd-J) once it seems necessary without reloading.


>Yes that is unfortunate. Safari had the option to toggle JavaScript via Shortcut until recently, but it was removed. The only browser I know which can easily toggle JavaScript now is Brave.

There's a Firefox Addon[0] for that.

[0] https://addons.mozilla.org/en-US/firefox/addon/javascript-to...


I once wrote a Chrome web browser extension that removes these duplicated browser history entries. The Chrome store denied it, citing that it didn’t have enough functionality to be valuable.

That means your problem is obviously not big enough to complain about ;)


It works for me. Maybe the author fixed it in the meantime?

Example: https://yuanchuan.github.io/intro-to-css-doodle/#13


Competition has such a beautiful origin of the word "com-" (together) + "petere" (strive):

> to strive alongside another for the attainment of something

Not necessarily in opposition, how it is often interpreted nowadays, but in a shared endeavour to achieve excellence. Pushing each other to be better.


I like https://www.redmine.org/. It’s stable, contains all features I expect from issue tracking, fast, easy to export and configure. And if you must, very easy to go into the code or database and change.


That’s not apples to apples. You can host the spreadsheet online to solve the syncing issues. When doing that, Jira becomes much less advantageous.

When things need to get done, I see people writing spreadsheets for fast adaptive tracking and then once they are done, they sync it with Jira manually post-factum just because they must. Jira becomes a tax to pay, and a slow centralised versioning system.


I agree that CRDT spreadsheets like Google Sheets have similar features, but we only got those recently as well.


Nearly all spreadsheet replacement software is worse though: it’s seeming clarity comes from being overly rigid or overly difficult to configure.

I don’t get the hate for spreadsheets. It has APIs, great primitives, good automation capabilities, im-/export, and is human-readable and writeable.

This particular spreadsheet from the article might have gone bad, but for centrally tracking an 20,000 item list, a spreadsheet doesn’t seem to be completely out of place.

To improve on it for a presumably very specialised use case with recurring changes and adaptive processes that might give you an edge over competitors, they probably need their own small development team. And this can of course go bad quickly too.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: