https://aosabook.org/en/500L/web-spreadsheet.html
Chinese (Traditional): https://github.com/aosabook/500lines/blob/master/spreadsheet...
https://aosabook.org/en/socialcalc.html
You can check the series out in its entirety at https://aosabook.org
1,787 karma · joined October 29, 2013
author: The Tao of tmux (https://leanpub.com/the-tao-of-tmux) available to read for free online at https://leanpub.com/the-tao-of-tmux/free
software libraries: cihai, unihan-etl, tmuxp, libtmux, vcspull, libvcs
tony (at) git-pull.com
https://www.git-pull.com
(If what I say isn't helpful to you, disregard it. Spread the good will and good tidings!)
https://aosabook.org/en/500L/web-spreadsheet.html
Chinese (Traditional): https://github.com/aosabook/500lines/blob/master/spreadsheet...
https://aosabook.org/en/socialcalc.html
You can check the series out in its entirety at https://aosabook.org
Windows 10 snapping keyboard keys are top tier. Not automated tiling, but save so much time. Also the GUI is beautiful on whatever screen you plug it into (including 4k). On Linux DE's right now? Mint or gnome will show options to scale up 200%, 300%, 400%(!) Even 200% is far to much.
Tiling WM+HDPI doesn't quite exist. Most use gtkrc, xresources, and the WM config to play with sizes. But that doesn't translate across different monitors. So it's a flawed system.
Let's assume HDPI+linux and tiling WM's were ironed out: In practice tiling WM's aren't as good because once you get into a terminal window, it's not as easy as it looks to copy from terminals <-> "gui" applications. It's possible, but the time spent ironing it out may not be worth the trade off for some. For instance I can't rely on copying from a vim inside of tmux, I do :!leafpad % to open a file and copy from that.
As for HDPI and tiling WM's, swaywm is an i3 for wayland that appears to support it: https://swaywm.org/
If you're okay with just HDPI and basic snapping: https://system76.com/pop or gnome 3.32 (that'd be ubuntu 19.04 or debian experimental at the moment I believe). Gnome 3.32 has fractional scaling. That'll scale by 125%, 150%, 175% (probably what you want)
Gnome's snapping isn't a smooth as Window 10's. Windows 10 is really good and half-sizing vertically. IMO: It'd be ideal if gnome 3 behaved the same as windows snap did by default. Extensions can help, but if you rely on them, they're limited and often behind of the latest gnome version (or two or three, or become abandoned entirely [1]), and don't wire-in to keybindings as well.
I haven't seen this puzzle game before, I had to read into it a bit (and had to actually cheat a bit, via solve_puzzles.py.)
Works fine out of the box with python 3, no extra libraries required.
This is good enough to submit to PyPI. Seems like a nice terminal game. Something to play in a tmux pane while tests are running or while waking up with a coffee.
Also I looked at the code, it looks fine.
I saw the multiprocessing in generate_puzzles. Wow. I don't even know what Thread.starmap does. This works nicely.
Keep it up!
Most of the stuff I said still sticks for me (after reading article, and after using ORM this time).
I haven't programmed much golang. But with Python + Django I can use `./manage.py shell_plus` and can drop immediately into a shell with history, readline support, syntax highlighting, and tab completion, with all model objects in local scope.
I can then do lookups and annotations (Yes, they're expensive, not for production, but save lots of time during the day in a pinch):
Lookup:
Library.objects.filter(books__author__name='Book author')
Annotation: Author.objects.annotate(total_books=Count('books')).filter(total_books__gt=5)
When the data model of a project gets bigger, writing queries by hand gets harder to think about. Perhaps its due to my own overreliance on ORM's: but I can't fathom how I'd manage without them. Because in practice the data models are far more complex than above, and it'd take a lot of time (not to mention mental energy that could be put to use elsewhere)Also, there are ways around performance problems: For one, it may entail rejecting features offered by the ORM. Such as django's content types, multi-table inheritance to instead use abstract inheritance (basically just reusing common fields) and even plain one-to-one relations. They're just too complicated and slow at scale.
Same goes for extending the ORM with stuff like django-polymorphic (and django-model-utils). I've gotten nice performance out of django-polymorphic (and cleaner code), but it's hiding a ton of metaprogramming, there's still a penalty "upcasting" naive models, and they're very burdensome to maintain if APIs fall out of date.
Next is trimming down queries with prefetching, only(), and doing direct ID lookups. This prevents multiple queries from piling up by doing the join ahead of time, only getting fields asked for, and doing the fastest lookup for objects after a more expensive "filtering" query has ran.
Here's an example of the query earlier, with .only():
Author.objects.annotate(total_books=Count('books')).filter(total_books__gt=5).only('id')
And to print the SQL query out: print(Author.objects.annotate(total_books=Count('books')).filter(total_books__gt=5).only('id').query)
That would then be used in something like: BookSet.objects.filter(book__in=Author.objects.annotate(total_books=Count('books')).filter(total_books__gt=5).values_list('id', flat=True))
And finally, for debugging certain types of query performance, django-debug-toolbar is nice. If its API calls django-silk can "look back" on background requests.The article was fair IMO, but I'd wager ORM's payoff depends on the ecosystem. Software being about tradeoffs: the convenience outweighs the downsides everytime for me. Maybe I'm to be humbled and find I'm not getting the big picture, and it could be just plain learnt-dependence, but it'd be a step back in productivity for me not to have an ORM.
Windows 10 support for things is fantastic. It's faster than Mac OS X and Linux for me. It multitasks better. The HDPI support is very mature compared to Windows 7/8. Multi-monitors just work. I love snapping windows (via corners and hot keys). Also Windows Key + Shift + S to click+drag screenshots to clipboard.
Everything just works. Or the driver is a Google away. Wireless printers and scanners. Bluetooth headphones. Apps like slack, trello, spotify.
While I haven't used the Surface, I was considering one for development, but the repairability on the Surface Book 2 (if that's what you mean) is worse than the Macbook Pro: https://www.ifixit.com/Teardown/Microsoft+Surface+Book+2+Tea...
On the other hand, Windows 10 "just works" on a lot of hardware. I recommend Lenovo X and T series. Dell XPS series are getting good reviews.
WSL: I'm running webpack via npm, postgres, django and flask. I keep the project files in the windows layer and symlink it into WSL. I turn off Defender because it's the only way to work. WSL is far too slow for me to use Defender on.
Despite that, I turn a lot of call home stuff off. There's tons of telemetry stuff that adds no value. I tried W10Privacy and OOSU10 for it. I wish Microsoft would just add a button to turn all the cloud cruft/call home stuff off.
There is a nasty issue where running rm -rf node_modules that can cause the system to freeze. So go into explorer to remove that with shift+delete. Sometimes I still have to restart.
Microsoft has won a lot of confidence from me with Windows 10, VSCode, and WSL.
Books:
How to Win Friends and Influence People and How to Stop Worrying and Start Living by Dale Carnegie
Taste testing:
PhilosophersNotes is like sparknotes for self-help books. Can be used as a way to discover / screen books you'd like.
Audio:
Psychology in Seattle's episodes regarding Attachment Theory (6 episodes). The reason why is it's a swiss army knife for understanding relationships and behavior. These episodes are paywalled though, but there are free episodes available if you use a Podcast app.
Like aphextron mentioned Socrates: Republic, Apology by Plato are really good. The one narrated by Ray Childs.
Audible for Zen and the Art of Motorcycle Maintenance by Robert Pirsig (it's like a Socratic dialog about what Quality is)
A lot of stuff by The Teaching Company / Great Courses in general have been good quality (maybe I've been lucky).
~/.local:
It's intended to be /usr/local in the user's home directory. There's a bit of a backstory here though: Linux distros don't follow `/usr/local` as well as BSD's, not much may be there.
~/.local/share:
Same idea, for /usr/local/share. But on many linux distros, this is `/usr/share`. XDG is trying to do is mirror the system directories in the user's filespace.
Let's assume there's going to be a lot of applications: they won't agree on where cache, config, and data storage is kept at within ~/.myprogram. With XDG, if someone wants to clean out all their cache files? rm -rf ~/.cache.
The other thing is: Typically the user won't be looking at ~/.local/share/myprogram - it's for data the application itself is going to use. It doesn't really count against it. What I think we will be looking at though: configuration files. That's where I think XDG is kind of original - but it's really close to what /etc is.
As for ~/.myprogram: I'd be okay with that, if it were purely configuration. But XDG serves the article writer's purpose fine: Keeping $HOME clean. I kind of think splitting between ~/.config, ~/.local/share, and ~/.cache ends up feeling more consistent with how linux/bsd organizes files.
The reason I like it is it provides directories to use across platforms (edit: Not sure about Windows), relative to the user. Since the applications download a file (UNIHAN database [1]) to bootstrap, we want to store it in the user's files, not the systems. The other thing I do that's helpful is using sqlite (which is often built with Python).
This combination gives a database, and a place to store configuration, downloaded/built files, in an organized way across systems.
The nice things XDG "standardizes" which I'm using:
$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.
$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.
$XDG_CACHE_HOME defines the base directory relative to which user specific non-essential data files should be stored. If $XDG_CACHE_HOME is either not set or empty, a default equal to $HOME/.cache should be used.
Why the implementation is helpful:
It defines a common directory for cache/data/config files, with applications inside them, e.g. ~/.config/i3, ~/.config/tmuxp, rather than adding more stuff to ~/.i3, ~/.tmuxp. When standards aren't being followed, programs end up storing their configurations / data / etc all over.
Another thing is it defines directories relative to the user themselves and for the system files. Dotfiles may imply configuration / artifacts in the users home directory, it doesn't have. The thing I like is I can check for configuration in user files (for instance ~/.gtk-3.0/), then fall back on checking the system files (/etc/gtk-3.0).
The benefit of user files is they're writable out of the box, so if there's going to be any file generated that the user needs to keep (like an unzipped version of UNIHAN) that can be cached so they don't have to download it again.
(XDG Link: https://specifications.freedesktop.org/basedir-spec/basedir-...)
Merely giving back in any sense helps. Sometimes open source patches are not important in themselves, but taken as a whole make a big dent: A good portion (1/3? 1/2?) of my contributions are very trivial (typos, package updates, etc.)
I use a few things to track open source contributions: OpenHub (https://www.openhub.net/accounts/git-pull), and a new thing called sourcerer.io: https://sourcerer.io/tony.
It goes back to my first patches which were tiny and failed to conform to the project's code standards :P I hope this can be encouragement that little wins build up.
There are also projects I've made that I personally deem important, but aren't known or are in a niche space. For instance, unihan-etl (https://unihan-etl.git-pull.com), a tool for extracting UNIHAN (https://www.unicode.org/reports/tr38/). If someone is in a situation where they need an extraction of Chinese/Japanese/Korean unicode characters, this tool can save them a lot of time.
There's more to the story: It's also a building block of a larger project, cihai: https://cihai.git-pull.com. I am planning on making this project a spiritual successor to Christoph Burgmer's cjklib (http://cjklib.org)
- CMake, yay! These make generating build files for a variety of platforms (even Windows) a breeze. It also works with code completion stuff (CLion IDE, KDevelop both have CMake-based projects)
- I like how it splits stuff up as well (https://github.com/klaussilveira/qengine/tree/master/src/gam...).
- As for vendorizing SDL2, there is an opportunity for optimization: The shared libraries and header files can be scanned through CMake scripts. Example: https://github.com/tcbrindle/sdl2-cmake-scripts.
- I see the .clang-format file, nice! (This is for clang-format: https://clang.llvm.org/docs/ClangFormat.html)
Unfortunately, license is going to be a real barrier to most game developers. The ironic thing is this engine includes SDL 2 which prides itself on being on a permissive license. (https://youtu.be/MeMPCSqQ-34?t=405, 6:40 to 7:30)
If it's the intention to create an open source library to be helpful as possible to developers. If it's the intention to have a library just for use in the GPL ecosystem of games (which isn't bad: OpenTTD is GPL!) then this is okay.
The reason why is a private game developer want to retain control of their intellectual property, even throughout the prototyping phase.
As for open sourcing, I'd approach it in a different way: I'd release reusable components under a permissive license (e.g. MIT, BSD, ISC, zlib, etc.) and keep any creative work product code/source files private.
Similar SDL2 framework for 2D games (I made some CMake contributions a while back): https://oxygine.org/
I love this service as a publishing solution. You can write markdown and get your book updated to dropbox (while you write it/push it to VCS) and then publish directly through them to epub/PDF. But the other nice thing is they can export Amazon-compatible files so you can publish to Kindle.
They also offer a very fair and transparent royalty structure. I found Amazon could be a bit greedy. The reason why is when a book goes above 9.99, they increase the royalty significantly.
The only other tidbit I have to say is:
I also considered using sphinx-doc as a route to build the book. I haven't found a way to offer an appealing LaTeX (theme? template?) that'd work with it. If you do know LaTeX well, and have time on your side, maybe sphinx-doc could be down your alley. It can build to HTML, PDF, and epub.
As far as distribution goes: My experience with Apple's book store was very cumbersome. Difficult to get support, and in one case there was a glitch that unpublished the book.
If you want to hop on board a rolling release, firmware-buster-DI-alpha3-amd64-DVD-1.iso will give you a fully working debian testing install with closed source drivers.
(Weekly builds are known to fail from time to time)
Then, pair that with a sources.list generator: https://debgen.simplylinux.ch/
And one more ingredient: if you use gnome 3, you may have to copy a file to get gnome extension installation via chrome working. Copy the contents of /etc/chromium/native-messaging-hosts/ to /etc/opt/chrome/native-messaging-hosts/.
A bit off topic: for gnome 3 extensions, this has been indispensable: https://extensions.gnome.org/extension/723/pixel-saver/
For tiling window managers, I recommend i3: https://i3wm.org/
Agreed.
For a bit of an optimization to that:
- https://github.com/rainux/vim-desert-warm-256
Not many stars on it, but works on a few machines without needing to have extra stuff installed.
If you like Python, tmuxp (https://tmuxp.git-pull.com) and libtmux (https://libtmux.git-pull.com) could both use maintainers.
In addition, any project on the sidebar of https://www.git-pull.com would help from a maintainer.
If you like the Chinese / Japanese / Korean language, another promising project I have (which has yet to gain traction) is https://cihai.git-pull.com for CJK-related language tools. I am designing it to be a successor to cjklib (https://pypi.python.org/pypi/cjklib)
I think it could be natural. A lot of smart interlinking of posts, clustering different niches, and posts being spread across social websites.
I can even give a direct example. My book The Tao of tmux is available for free online. It used to be in the google top 10 for tmux. Now, a newer article on HackerNoon is up at the very top: https://hackernoon.com/a-gentle-introduction-to-tmux-8d784c4...
I think people just like the Medium posts, heh. They made a publishing platform that attracted talented writers, and the feedback loop with readers seems to be encouraging it to grow.
Medium actually hampers my personal efforts since I keep my own static website and wrote a custom blog-like application I post. I feel I may end up having to move writing efforts there since the velocity there is so big.
P.S. NYTimes digital team uses Medium: https://open.nytimes.com/ I think that demonstrates to me people just like the product and it's going to self-perpetuate until someone devises something better.
But my point is that stuff like Aha, at a smaller startup, can articulate business goals / customer stuff to individual issues on Github/Pivotal Tracker. That in itself is a software solution that supervises itself.
Not every startup fits that. But I think if they were open to it they'd like it. There is a downside though, it's 74/mo per user. Ugh. That cost.
https://www.aha.io/product/pricing
But agreed on blockchain in itself not making much sense in this case. The only times I've seen it intertwined with issues was with open source, cryptocurrency places like Gitcoin.
> Other than that, it either falls into micro management or into a tech lead role. As soon as a manager starts getting involved in technical decision it usually goes against the tech lead of the team or architect. If a manager asks for status updates constantly it's pure micro management and against the Project Manager.
You articulated this a lot better than I could. This is where I've seen manager's occasionally can harm more than they help.
Tools: at Boostable we had Aha (https://www.aha.io/). And we would have the founder Alex split the tickets up. Aha would disseminate the tickets into Pivotal Tracker (https://www.pivotaltracker.com/).
Aha played a really big role in top-down delegation of tasks and equating them to business objectives. That software is pretty cool and I recommend checking it out, because I think in some cases it can make manager's redundant.
After that, it was autonomous. I created a lot of issues by myself directly in Pivotal (which probably lends to them not being recognized officially, since Aha was where the business impact was overviewed)
Their time should be spent listening to customers, directors, and other stakeholders to check if they're sorely missing things. They should keep lines of communication open and be proactive.
One thing we don't see often enough is the "Principle Software Engineer" role in startups.
At most startups, it's an open office floor plan. The data analysts, sales person, and marketer would come up to me with a request for something that was actually detrimental to their doing their job, but it wasn't getting focused on in our sprints.
At Boostable (W14), I was handling all server / e-commerce / front-end issues, plus setting up systems for marketing and sales needs that wouldn't have otherwise been done. And it brought substantial value to the company, for low hanging fruit a manager would have kept kicking the can down the road.
The issue is, these proactive things were never recognized or appreciated the way I think they should have been. Heh. It's as if it the work being unofficial made it less valued, when the way I saw it, it was shared success.
If a programmer is impactful and setting the best practices for the team, they can report directly to VP/CTO. Less supervision. Mentor fellow employees.
Some of the things I like: customer first, open source contributors, remote-friendly, open communication, etc.
But the thing is, KeyValues let's you pick stuff you like, based on stuff employees generally look for. And it shifts more burden onto the employer to define and explain their culture.
I think employers would fare better if they holistically evaluated people.
That part of shifting the employers to think and interact more is essential. Just throwing around code golf while they accept 1000 resumes and repost every month, when only one space is open - isn't a talent quest - it's spurning a class of sincere developers who are job seekers.
Facebook's open source footprint is quite influential. Namely, React + Redux + Reselect are pretty sweet. React-Native. Haven't used it, but hhvm.
And I haven't heard of this one before, but it looks cool: https://github.com/facebook/prepack
That's a nice portfolio.
The best company blogs I see are ones that have their own open source projects. Like Facebook. Where they break off a generally usable piece of their codebase into a library.
Nothing beats a nice version release with an update on all the features and improvements it brings.
https://reactjs.org/blog/2014/02/20/react-v0.9.html
So I consider open source subsidiaries as "company tech blogs". Let's try to keep things purely to blogs:
https://stripe.com/blog/engineering
Favorite post was their post mortem: https://web.archive.org/web/20160126093909/https://support.s...
This was Stripe's 2015 outage with the database index change (https://news.ycombinator.com/item?id=10365798) I presumed it was an index involving customer ID, but it wasn't specific.
They want to make sure new feature proposals for C++ are being thought through more carefully:
> We see C++ in danger of losing coherency due to proposals based on differing and sometimes mutually contradictory design philosophies and differing stylistic tastes. For that reason, we recommend that you (re)read [Winkel,2017] before proposing a new feature (language or library).
Here is the document they are referring to, Operating principles for evolving C++: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p055...
The way TDG articulates where things stand is sage-like. It's reassuring they're sympathetic to new language features impacting normal users, and not just the people on the group.
https://github.com/postgres/postgres/blob/master/src/backend...
https://github.com/postgres/postgres/blob/master/src/backend...
Link to all files / README: https://github.com/postgres/postgres/tree/master/src/backend...
What I like about it is you can add open source projects to your stack, not just SAAS services. And also, you can split your server-side stack from your personal tools.
It's like a 2D platform version of minecraft.
The upsert: https://vincit.github.io/objection.js/#graph-upserts
Also it's built on Knex.js: http://knexjs.org/
Try this out website: https://www.keyvalues.com/
You can select multiple categories of what the company values, so you have a better fit before you ever walk in.
Munchies episode: https://www.youtube.com/watch?v=-sJ6IJZJhUU
https://www.newyorker.com/books/page-turner/how-a-texas-teen...
The name of his business is "Regalis Foods": http://www.regalisfoods.com/welcome
Works over SSH. Uses pure Python. No need to deploy and configure minions/agents/etc.
Fabric also benefits from being highly composable. Since it's python, you can parametrize and reuse functions and create class-based tasks [1]
Want to use Fabric with python 3? Here is a fork with Python 3 support: https://github.com/mathiasertl/fabric/
If you use fabtools, I maintain a fork of it for fabric3: https://github.com/develtech/fabtools/tree/fabric3
[1] http://docs.fabfile.org/en/1.14/usage/tasks.html#task-subcla...