HNHacker News
TopNewBestAskShowJobs

okaleniuk

1,667 karma · joined October 3, 2017

I do https://wordsandbuttons.online and wrote https://www.manning.com/books/geometry-for-programmers
submissionscomments
okaleniuk··on Run Your Own Website
I do run my own site. Moreover, I do all the coding, styling, and layout manually and without any 3rd-party libraries or frameworks. Or even in-house libraries for that matter.

This works for me in terms of freedom. I can do interactive plots, quizzes, games and all kind of programmable things I can imagine. No restrictions.

In fact, I left Medium because I was restricted to text and images only. I want more. I want words and buttons: https://wordsandbuttons.online

But it's not really aligned with the reasons from the post. It's not a resume. It would have been an awful resume. I wouldn't hire myself by this resume.

And keeping record is, of course, nice. But it has nothing to do with running your own website. You can keep record on Medium, too. In fact, it would be more effective since it works wonders for the small notes.

Still, I totally agree that keeping your own site is a fascinating experience and it's well worth time and effort.

okaleniuk··on Can I buy a phone that doesn’t use anything from Google or Apple?
I recently switched to a smartphone after 7 years of Nokia 1280 since I couldn't find a modern dumb phone at least half as satisfying as that one.

Nokia 106 is frustratingly bad. Just one example: by default, it has a "wallpaper" which looks like dirt. You can't just turn it off but it does have an option to choose whatever wallpaper you want instead. The thing is, the only wallpaper available is the default one. So the dirt is mandatory, but you can pretend that you choose it. I don't want that kind of Russian democracy in my phone.

okaleniuk··on SymPy makes math fun again
Yes, indeed.
okaleniuk··on SymPy makes math fun again
Yes, that's correct!

In fact, with sine modelling, Taylor series beats this approach with lower error. But with this you get to choose your properties so you might get more useful model instead.

Say, if you want to conjoin two sine models got from Taylor series to have it on a full [0, 2pi], you will have derivative discontinuity - a bump - on the joint. But with this model you wouldn't since it's explicitly required to be the inverse number at 0 and at pi/2.

okaleniuk··on SymPy makes math fun again
SymPy can expand series too, one line of code - and you're done. But that would be no fun.

The idea here is: every differentiation or integration over a polynomial results in another polynomial, right? And a polynomial in a point is just a linear equation of its coefficients. You can shove them into a system and make SymPy solve it.

So you can use differential and integral properties of some random function in some points, turn it into a linear system - and have a model of a function as a polynomial. That's it!

okaleniuk··on SymPy makes math fun again
Wow! Now that's a life hack! :-)

And you can get a cluster of these for a price of one PC. Awesome!

okaleniuk··on SymPy makes math fun again
Neat! You have Julia and R too. Thank you!
okaleniuk··on SymPy makes math fun again
Well, the online version might fail on heavy computations to be honest, so it might be best to have it installed locally if you're planning to do some serious stuff. But for the first acquaintance, the online SymPy should be fine.
okaleniuk··on SymPy makes math fun again
By the way, there is SymPy online: https://live.sympy.org/

You don't even have to install anything!

okaleniuk··on HTML is the Web
Yes, that's true. If you have lots of work to automate - sure, you need something to automate it.
okaleniuk··on HTML is the Web
Good point! Thanks!
okaleniuk··on HTML is the Web
As an experiment, I started https://wordsandbuttons.online/ in plain hand-crafted HTML+CSS+JS (JS for the interactive bits only). Every page is self-sufficient, there are no dependencies, no dynamic data exchange, no HTML generators, - nothing. And it works so well, I don't really want any frameworks now.

It's perfectly malleable - I can make every page do exactly what I want it to. It's lean and fast - every page even with all the interactive plots, games and quizzes, and syntax highlighting, is still under 64K. And it doesn't accumulate technical debt. There are no dependencies, even within the project. An occasional bug from the past wouldn't bite me in the future.

At the beginning, I thought that typing the HTML by hand would be too tedious. But it's not. It is a bit boring, sure, but it's only like 5% of all the work so usually I don't really want to automate it.

And when I do, I just write scripts that handle HTML just like any other text. Works wonders for me.

okaleniuk··on Writing HTML in HTML
It is!
okaleniuk··on Writing HTML in HTML
The thing is, you don't just copy-paste stuff. You make it better every time you spend some effort. Consistency is way too overrated. Progress is what you should aspire.

I've redone this page several times because the plots for it evolved on other pages, and I re "copy-pasted" the code back then: https://wordsandbuttons.online/interactive_guide_to_homogene...

okaleniuk··on Writing HTML in HTML
Yes, I do that too. I do have scripts that do maintenance jobs, like changing the footer now and then. But they don't work with templates, they use the HTML input and just process it like any other data.

I don't really like the menu idea though. I prefer plain content with just a bit of links in the footer, like this: https://wordsandbuttons.online/programmers_introduction_to_l...

okaleniuk··on Writing HTML in HTML
It's not a very good principle. It's not a very good principle.
okaleniuk··on Writing HTML in HTML
And they only automate the trivial stuff anyway.

I spend most of the time on writing, editing, then programming, and only then typing the text and doing the layout. The last 5% of that could be automated, but then I wouldn't be able to write things down from my phone while traveling, or directly from my CHIP when exploring ARM-related things.

okaleniuk··on Writing HTML in HTML
Can confirm. I'm doing https://wordsandbuttons.online in plain HTML and yes, it's incredibly liberating.

But I went a bit further, I do write HTML by hand in vim (plus some python scripts when applicable). Writing HTML is not that bad once you get used to it. My pages are not plain text anyway. They are mostly interactive things written in JavaScript. Since I spend considerable time coding, it doesn't bother me to spend five minutes putting tags here and there, too.

Coming up with the design decisions takes much more effort than typing in the actual tags.

And yes, I do have an RSS. It's also updated manually since it's again an effort too small to automate.

okaleniuk··on Always Own Your Platform
This is sure a way to go too.

I prefer scripts to do monkey job for me instead of templates. They take html as input and produce html as output. It's trivial text processing. But this way every text pattern, even that I would have never thought of beforehand, may become a 'template' in the future.

okaleniuk··on Always Own Your Platform
I used to have a dedicated server, but I figured that with my needs, cheap shared hosting works just as good and at a fraction of a cost.
okaleniuk··on Always Own Your Platform
I already do. https://wordsandbuttons.online/ is just a static script-maintainable stand alone site. It has no 3rd-party platform but the web hosting. Moreover, I own the domain and don't really rely on anything provider-specific. I can migrate it any day and users wouldn't notice a thing.

I also use GitHub to host sources https://github.com/akalenuk/wordsandbuttons but it's just a convenience not a necessity.

The whole thing is just a set of HTML pages with embedded CSS and JS. There are no 3rd-party dependencies or even inner dependencies. No frameworks, no libraries. Each page is self-contained.

At first I thought that writing the whole thing from scratch would be cumbersome, that maybe I need some framework for plots and UI. Now I just enjoy the freedom I have. I can turn any UI idea that comes to mind into some JS code. And even if the code appears redundant because of no dependency policy, each page still comes tiny. With all the JS inside, every one my pages is still under 64KB.

This makes it not only lean and fast but reliable as well. Words And Buttons Online has 5'000-100'000 monthly visitors depending on success of every particular page; never had a problem with Reddit-effect.

In general, I am quite satisfied with this no-platform/no-dependencies decision. Yes, writing HTML manually is a bit tedious and sometimes boring, but the benefits way outweigh the cost.

okaleniuk··on Ask HN: What metaprogrammable language do you/would like to use?
Not sure if it's sarcasm. True, JavaScript is fun to meta-program. But it's hell to debug.
okaleniuk··on Ask HN: What metaprogrammable language do you/would like to use?
I would love to try Rebol (or Red) for some meaningful task.
okaleniuk··on Cog: Use pieces of Python code as generators in your source files
No-no, I mean if generating code is in a separate Python file, then I can debug it with pdb, I can profile it with cProfile, I can run Pylint on it, - all the standard tools.

I like the idea of everything sharing the same file, too, but it does make working with Python part a bit more difficult.

Also, with keeping it separate, the "every language" part comes up. It doesn't have to by Python if it's a separate code generator. Whatever suits you will work. You can generate code for C in C++. Or assembly in Common Lisp. Everything in anything.

okaleniuk··on Cog: Use pieces of Python code as generators in your source files
Or you can generate pieces of code with non-embedded Python scripts at the earliest stage of make and inline them with the host language's preprocessor.

This way you'll have the same functionality but with standard tooling for every language. This means conventional debugging, static analysis, testing etc.

And no extra dependencies, too.

okaleniuk··on Against metrics: how measuring performance by numbers backfires
I used to work once for a company where the developers were reworded for writing more lines of code than the average. Once.
okaleniuk··on Text-only news sites are slowly making a comeback. Here’s why
Thank you for bringing this up! Apparently, the JavaScript behind canvases gets disabled. I'll think something out.
okaleniuk··on Text-only news sites are slowly making a comeback. Here’s why
Thanks! Mostly manually, but I write Python scripts for menial jobs. It's surprisingly easy when the site is that simple.
okaleniuk··on Text-only news sites are slowly making a comeback. Here’s why
I'm really glad to hear that. This lightweight design is great.

Maybe it shouldn't be for the news sites only. I make http://wordsandbuttons.online in this spirit, too. It's not text only, it has interactive plots, and quizzes, and everything. But the core idea: give people only what they come for, - works well for it as well. Since the pages are in tenths of KB, I pay for the cheapest hosting possible and it still holds "slashdot effect".

okaleniuk··on Ask HN: How do you read the news without getting depressed?
In 2014 I've found myself trapped in Eastern Ukraine under Russian occupation. We had both Ukrainian and Russian news available, and I've learned three things from this experience.

1. The defending side never knows what's going on. If they know, they prevent it with available countermeasures, and there is nothing to make news from.

2. The offending side always uses the knowledge they have for propaganda. If they don't, it's because their news-making activities have been successfully prevented by the defending side.

3. Never spill the third thing if you don't want to start a needless flame war.

I don't watch the news since then.

← PreviousPage 10 of 11Next →