1. 2

    I can definitely see what the author is saying. I spent almost 2 hours “debugging” by doing printfs and looking around on StackOverflow last night. Wound up fixing the problem in a 20 minute gdb session. We can get really hardwired to simply trawl the Web for a solution instead of using tools to take a deeper look at what our issue is and think about it for a bit.

    1. 12

      Spectacle works great for simple window snapping

      1. 13

        Development on Spectacle has stopped, so Rectangle is the alternative that’s based on Spectacle but which is being actively maintained.

        1. 4

          Spectacle works just fine. It’s simple and mature. No need to “actively maintain”.

          1. 9

            I’m the developer of Rectangle and this spurred me to finally write a post about this since I see this comment from time to time. In summary, if you’re content with your current Spectacle setup that’s great. If you’re looking to install it new, there is a bit of security risk that’s worth being aware of with apps that require accessibility privileges but are not notarized. Also, there’s always potential for software to break with each macOS release, although Spectacle has been pretty robust over the years. Through the lens of a user, personally I would pick an app that’s maintained just so I don’t have to cross my fingers with each macOS upgrade. But hey, to each their own. Spectacle’s a great app.

          2. 1

            Good to know about Rectangle. I didn’t know Spectacle wasn’t actively maintained.

            That said, if the user only cares about window snapping, there’s no real reason to use either over the other. They both deliver on window snapping. And the reason to use Rectangle over Spectacle has nothing to do with being actively maintained; it has to do with features. Rectangle definitely offers more than Spectacle does

          3. 1

            Just want to emphasize how big window snapping is: idk how I lived without it on my Mac.

          1. 2

            I have some time off before my last semester of college starts, so I’ll be working a lot on personal projects! Mostly my terminal RSS reader, but also a couple of other things including adding a networking stack to xv6.

            1. 5

              I really love Julia’s work towards normalizing not knowing all the answers. It’s ok to ask questions!

              1. 2

                Hear, hear! This is a large part of why my personal rule is to never tweet out anything that can’t be fully understood by just the 280 characters in the tweet itself (I use Twitter as an example here because it’s the social media platform that I use most). There’s just no way to fully communicate complex ideas in such a limiting form factor, with the added limitation of text-based communication discussed in this post. It’s amazing how much misunderstanding clears up between two people with different views when they sit down and talk instead of trading jabs via the Web.

                1. 7

                  Great article! It touched on a lot of things that I’ve been thinking about recently. Some of my quick thoughts:

                  I think that part of the issue here is the concept of abstraction. Abstractions are our bread and butter as computer folk, allowing us to build ever higher on the stack of turtles. And as we know, abstractions hide the reality of their underlying implementations. Software moves exponentially faster as more abstractions are built and as developers can think less and less about the complexity of the underlying implementation. The problem that you get at in this post is that at the bottom of the stack of turtles, under all the abstractions that enable “efficiency” and increases in productivity, are people. No other technology has so radically changed society in such a brief period of time as computing. It’s a feedback loop, every advance allowing us to create the next one even faster. But as the people are buried ever deeper in the stack of abstractions, it becomes easier and easier to harm them with our progress. Computing is here to stay at this point. I wonder, however, if there will ever be a way to stop the abstraction machine and really think about the impact of the things that we build. It’s easier than ever before to create software. And yet it is not as easy to tell what its impact will be. (Case in point, the script for getting grocery deliver slots. Easy to fix the “problem”, but also easy for the developer to overlook the harm that this could have on others)

                  1. 2

                    I’ve actually been thinking about something that could be between Twitter (which can be intimidating in how public it is) and a blog post (which can also be intimidating in how much effort needs to go into it to be “high quality”). thoughts seems to fill this space well! Being integrated with Git is also nice; enabling GH Pages on my thoughts repo automatically adds it to my GH Pages site.

                    1. 7

                      I use Notion! I’ve used Evernote and Trello previously, and Notion is like everything I’ve wanted previous tools to be. Their abstractions for units of information allows for very powerful and flexible orchestration, and their UI is second to none. You can use it for everything from simple note-taking to project management to personal finance management to link aggregation (I use it for all of these purposes). Also, if you’re a student or an educator, you get the first tier of their paid membership for free!

                      The one downside is that the Android app is pretty sluggish, but they are aware of the issues and are actively working to fix them.

                      1. 10

                        I know I’m definitely in the minority in this community, but I’m finally learning the basics of programming and web development. I began college as a CS major about 6 years ago, stopped focusing on school in favor of the “college experience”, and switched majors thinking it was too difficult for me even though I was passionate about the subject.

                        I jumped from major to major for years, never really making any substantial progress. Now, most of my general eds are business-related, so I’ve landed on CIS in order to not have to take even more time with CS-specific GEs while still getting as close to CS as I can with what I have.

                        Recently my interest in the subject was sparked again, so I decided to subscribe to a course online to learn the fundamentals of web development from the ground up. I’m decently proficient with the command line, but decided to start from the first lesson in case I missed anything important (read: I did.)

                        Today is the third or fourth day into the course, and I’m on the Git tutorial, which I never really learned because I didn’t have a need for it. So this week I’ll be finishing that and moving on to HTML and CSS. I really wish I stuck with CS in the beginning, but can’t change the past so the next best time to learn is now.

                        Edit: With all that said, will a CIS degree still be beneficial for future career prospects in the field, or would it be smarter to completely switch to CS and have to take more classes before transferring to a 4-year university?

                        1. 4

                          Hey! I’m a CS major (gonna graduate in December after 5 and a half years, so we’re similar in age I imagine). First off, props to you for getting started with some online coursework!

                          Edit: With all that said, will a CIS degree still be beneficial for future career prospects in the field, or would it be smarter to completely switch to CS and have to take more classes before transferring to a 4-year university?

                          The answer depends a lot on what your goals are. From what I’ve read, CIS is more focused on applying technology to business needs, and would put you more in a position for management/administrative roles in a technology department. A CS degree would put you in a position for software engineering/development roles, where you’re creating software. For me, it’s always helpful to think about what my long-term goals are and let them inform my decision-making here and now. If you want to get into a role where you’re building technology, then CS is probably the better route. If you’re wanting to make big-picture business decisions and think about how technology factors into those, then CIS might be better for you. Either way, computing-related jobs are highly needed in almost all industries. Even with the slowdown due to COVID-19, lots of places are still hiring.

                          I just took a look at your blog that you have linked in your profile, and it seems like you’re starting to get your feet wet in the world of programming! The upside of a CS degree is that it will give you a lot of background knowledge about computing that will really come in handy the longer you’re in the field. Now, it’s perfectly possible to be a great programmer without a CS degree (some of the best engineers around don’t have degrees!), but if higher education is something you’re already investing in, getting that background in CS fundamentals and computational thinking will really help you out no matter what area of computing you settle on. Good luck, and feel free to reach out if you have any questions!

                          1. 2

                            Thank you for the detailed response!

                            Once I settled on CIS, I was content with working in a management type role relating to technology for my future, but after some deep introspection, what I really enjoy doing is the actual creation of software (not that I’ve done much of that at all, but the idea behind it is what draws me in a lot more than management.) I’d much rather be solving technical problems and creating my own work than managing others who do that themselves.

                            Right now I’m seriously considering switching majors yet again back to CS to better align with what I’d like to do in life. I guess to put it bluntly, I don’t enjoy telling others what to do, I enjoy doing it myself. I already have some foundation in CS due to having a year of it under my belt when I began my education, but in the grand scheme of things that isn’t a whole lot and could definitely be built upon to a tremendous degree.

                            Thank you again for the thought out response, that definitely answered what I was wondering. I’ll be sure to reach out if any other related questions do come up!

                        1. 6

                          A couple more general tools that save me lots of time:

                          1. Session Buddy. This thing is a godsend. When I’m working on a project, I’ll often end up with 20+ Chrome tabs open for various searches I’ve made and documentation I’m reading. Session Buddy lets you save and label browsing sessions and reopen entire groups of tabs with one click. Now when I’m wrapping up for the day but don’t want to waste time tracking down all my online resources, I can save the session and reopen it later. It also autosaves your sessions, so if your machine crashes you can resume browsing after recovery.
                          2. Notion. This tool has been making a pretty big splash in the productivity software area for good reason. The abstractions that Notion provides for information are extremely powerful, letting you compose and transform how your information is laid out effortlessly. I use it for managing lots of aspects of my life, from my school assignments to blog posts to monthly budget. Also very useful is Notion’s Chrome extension, which I use to save links to a My Links page for later reading.
                          1. 2

                            Can you export the tabs’ URLs to a file for processing with a script? I have a need for that on Firefox. I’ll use Chrome for it if FF doesn’t have one.

                            1. 3

                              Yes! You can even select what type of data to export, and format as well (csv, JSON, Markdown, HTML, and raw text).

                              1. 3

                                I figured out how to do this recently (for a running FF session):

                                lz4jsoncat ~/.mozilla/firefox/e2f5cani.default/sessionstore-backups/recovery.jsonlz4 | jq .windows[].tabs[].entries[-1].url

                                (note that your session name under ~/.mozilla/firefox will probably be different)

                                1. 1

                                  what does this do ?

                                  1. 1

                                    Fetches the URLs for currently open tabs by spelunking through FireFox’s session backup files (i.e. how it remembers which tabs were open if it crashes).

                                    The two tools used are lz4jsoncat (a tool for reading Mozilla lz4json files - it’s in the apt repos) and jq to filter out the relevant values.

                                    1. 1

                                      It didn’t see it in apt repos. However, this answer looks helpful. I’ll try it later on.

                                2. 2

                                  I haven’t used firefox for years, but IIRC there was a short cut that let you see the various tabs open and then group them and open just that group & a way to export to json.

                                  One dream I’ve had was if a browsing session could be displayed visually as a tree, so you could navigate up and down and across the tree and you could see at a glance which browsing decisions were productive & which were distractions & the conceptual links between a various exploration / rabbit hole :)

                              1. 1

                                That’s why I think the focus on high level languages is bad.

                                I’d teach baremetal raspberry pi assembler programming, or on x86 FreeDOS and Flat Assembler.

                                The amount of cs grads I’ve encountered who can’t even write a simple program in assembler or C sickens me.

                                1. 14

                                  The amount of cs grads I’ve encountered who can’t even write a simple program in assembler or C sickens me.

                                  If you take the stance that CS is training for programming jobs, then there are a multitude of programming jobs where this doesn’t matter. Especially writing in assembler. (We should let C die a slow death anyway. And I say this as someone who works on a C compiler for a living.)

                                  If you take the stance that CS is learning to think computationally and understand computation, what evidence is there that knowing C and assembler even matter in this regard? I’ve never heard of anything about it. Everything I hear about it is dogma and completely unsubstantiated.

                                  1. 3

                                    If you take the stance that CS is training for programming jobs

                                    I have to say: I absolutely do not take this stance. University traditionally has been all about learning all about and advancing a subject or series thereof. A place of knowledge and research.

                                    It is a really bad trend that, for many universities and degrees, it is turning into a “prepare for job” course like the alternatives to university.

                                    to think computationally and understand computation, what evidence is there that knowing C and assembler even matter in this regard?

                                    That how computers work do not matter on understanding computation is quite the claim. I believe the burden of supporting this claim is with you.

                                    1. 3

                                      The comment by @matklad on this thread is proof of how very far a beginner can get without getting around to the so-called basics.

                                      1. 1

                                        It’s kind of amazing, but ultimately I have to feel sorry for the person who had to do it with hands tied on his back, and can’t help but wonder how much faster and farther they could have got otherwise.

                                        1. 4

                                          For that matter, along the four hours of Pascal we also got exposure to CS-flavored Boolean algebra (Karnaugh maps for minimization, and Boolean scheme modeling in some GUI program). This bit of knowledge was fun, but irrelevant for the polynomial things. We didn’t talk about assembly and compilers, and the lack of that knowledge didn’t harm, at that time.

                                    2. 2

                                      Came to this thread for exactly this idea. When I’ve taught uni students Java (which is only one of a few languages I’ve taught to students, not all of whom were in CS) we’ve used BlueJ which is an environment that removes the thinking between “open environment” and “type in Java”. That’s good for when you want students to explore an algorithm, coincidentally in Java notation, and bad for when you want them to learn how professional programmers write software, which is often done in Java despite the protestations of the RESF.

                                      Agreeing with or even understanding critiques of programming tooling in a CS class requires acceptance of what a CS class is for, and there isn’t wide agreement even among educators. Where I teach, plenty of the undergraduate classes don’t even use a computer because the goal is to understand computation, not to make a computer implement a customer’s requirements.

                                    3. 8

                                      I don’t think optimizing Computer Science education for the current local maximum of C-on-Unix is future proof.

                                      Anyway, most recent CS grads I’ve gotten to know online are very unhappy that their first developer jobs don’t allow them to use Haskell for everything.

                                      1. 1

                                        May I ask why? I agree that learning a systems programming language is probably a boon, but I imagine that C++ would be the language of choice at many institutions.

                                        1. 2

                                          I guess @ethoh is saying that universities shouldn’t be vocational schools, factory lines churning out programmers that know only one or few more things.

                                          I think students need to learn both, the high-level stuff and the low-level, from web servers to the basics of digital electronics. Assembler is not a very complicated language. It is useful for a student to understand how do you add two numbers using just two registers and an instruction. I wouldn’t have students write a game in assembler. But writing a number guessing game in a high-level language first, showing the compiler assembler and then being able to study what it does is a valuable skill.

                                          I would teach the full spectrum with a parallel curriculum of two courses, a programming 101 teaching some basics of a high-level programming language, and a computer engineering basics teaching the low-level bits. The first one of the high level one starts with hello world in Java/Python/X, moving on to more complicated applications focusing on more abstract problems, while the first class of the low-level one starts from boolean logic, moving on to logic gates, flip-flops, registers, von Neumann architectures, and so on.

                                          Eventually, about one third in of the curriculum, these courses would meet, so to speak; we would have now a sufficient understanding of the high-level language and the compiler so that we can inspect the raw assembler it generates, which we would then be able to understand given the low level knowledge we’ve accumulated. Then they would again diverge, the high-level language builds something more interesting and tangible, like a compiler, a web server, a game, while the low-level part goes on to study different microarchitectures, computer architectures, microcontrollers, embedded operating systems, and so on.

                                          By the end, the students would understand what the abstract machine C describes (a PDP-11) is different from the computers we have today, and how compilers, operating systems, even programs, make all sorts of interesting compromises to be able to perform efficiently. They would understand why your JavaScript web app was also vulnerable to Spectre.

                                          1. 2

                                            This is almost exactly how things are done at Georgia Tech, where I’m a student. There’s some variability depending on your specializations, but almost everyone goes through the sequence you’ve described. I’ve found that it’s given me a really solid foundation for learning the more practical parts of software engineering (SCM, web dev, building stuff with the cloud, best practices, etc), most of which I’ve learned on my own.

                                          2. 1

                                            C++ can be used to teach systems programming, but it is too much of an invitation to abstract away the machine. C is less problematic in that sense, but it is no replacement for assembly.

                                        1. 2

                                          I name my personal machines after authors that have been influential in my life. My MPB is named Schaeffer and my Ubuntu cloud dev machine is named Watson. My next machine will probably be named Hemingway!

                                          1. 6

                                            I have a MacBook Pro early 2017 (i5, 8gb, 128gb), and I’ve loved it as my dev machine. I also came from running Linux as my main OS for several years before getting my MacBook. MacOS is a breath of fresh air! Using Linux primarily is a great way to learn a lot of different things, but at some point you want something that will work without you having to be a sysadmin as well :P While MacOS is nowhere near as customizable in general, I didn’t miss the customizability of Linux mostly because those customizations were made to fix stuff that was broken, or to try to make the system compatible with consumer software. Pretty much all the commands and tools you’re used to on Linux are available on MacOS. Whenever you need something on Linux, you can use a VM. (my MBP, which the lowest spec’d model, handles a Ubuntu VM with relative ease)

                                            1. 2

                                              Do you miss the customization such as using WM like i3 or any other. I think if i switch to macbook I am going to miss that

                                              1. 1

                                                Yabai is a wonderful tiling window manager for macOS. Kitty and Alacritty are wonderful GPU accelerated terminal emulators that are customizable enough to make you feel at home. And if you miss the TUI status bar, as I did, you can use barbq a TUI status bar I made to scratch that itch (though it’s fairly coupled to my system at the moment).

                                                1. 1

                                                  I never used a window manager, so I can’t speak to that specifically, but I do know that I haven’t really missed any Linux features since switching to MacOS. It really comes down to what is worth the change for you. I always compare Linux to driving a car with a manual transmission. It gives you much more fine-grained control over how the machine works, but the downside is that you can break things more easily. Other OSs like Windows are more like driving an automatic car. They take care of a lot of the nitty-gritty of making the machine work for you, but the downside is that you have less control. MacOS is, in my case, a good compromise. I’m not super into customization of the system itself, so I can let MacOS take care of those details and then focus on the things I care about more. Plus, having a Unix system with its assumptions and tools is very important to me, so when looking for somewhere to switch to from Linux, MacOS was the best choice for me.

                                              1. 0

                                                We learned about Spring in my advanced OS class this semester; pretty cool stuff!

                                                1. 13

                                                  There’s definitely a “market” (1) for a web browser that just renders HTML only and no JavaScript. I’m using Firefox (with uMatrix / uBO) in this way to browse news sites without a problem. On Android, I’m using PrivacyBrowser from F-Droid for this purpose. Unfortunately NetSurf is just not daily driver material yet but I would like to switch to it eventually.

                                                  Essentially you’re using the web in a “read-only” sort of way since most interaction requires JavaScript. Obviously it doesn’t work out for all sites so I keep a separate browser around for when I need a richer experience with JavaScript.

                                                  In fact in some ways such a minimal “read-only” web browser offers a better experience on news articles from the latimes / nytimes website. It also works perfectly on this site, HN, old.reddit, and for viewing tweets (Twitter has a non-js version of their site).

                                                  1. When I say “market” I may only being describing a market with a market size of 1. 😀
                                                  1. 9

                                                    Essentially you’re using the web in a “read-only” sort of way since most interaction requires JavaScript. Obviously it doesn’t work out for all sites so I keep a separate browser around for when I need a richer experience with JavaScript.

                                                    Author here. SourceHut actually works pretty well with Netsurf, both read and write :)

                                                    I hope more of the web becomes compatible with more conservative browser implementations. I think that’s the only way out of this mess.

                                                    1. 4

                                                      SourceHut actually works pretty well with Netsurf, both read and write

                                                      Even when the site you’re using functions with the features Netsurf offers, it still doesn’t provide anything beyond the most trivial of keyboard shortcuts. Not only does it have a long way to go on catching up to being a functional browser, it is far behind on the much more easily-attainable table stakes of being a reasonable desktop application.

                                                    2. 9

                                                      The major problem I encounter blocking JS is that a huge percentage of “read-only” sites simply don’t render at all, which is lazy development on their part but it’s hard to fault not catering to such a small slice. And with accessibility APIs replacing DOM parsing for screen readers, that slice is containing fewer and fewer users with a11y needs, leaving only us ideologically anti-JS folk.

                                                      1. 7

                                                        Make that a market of 2! When running nested VMs for my Advanced Operating Systems class projects, I desperately wanted a browser that had basically 0 functionality other than just rendering the HTML. With only 8GB of RAM, my computer was stretched pretty thin between a VM with 8 nested VMs under it and an instance of Chrome with my assignment resources. I’ve often thought about building this type of minimalist browser once I’ve graduated and have more time on my hands for an extended project. In memory-tight situations like the one I was in, it could be pretty handy!

                                                        1. 22

                                                          once I’ve graduated and have more time on my hands

                                                          I hate to be the one to have to tell you this, but that’s really not how life works ;)

                                                          1. 6

                                                            Life works the way you choose for it to work. There are a lot of possible life-paths that would result in you having less free time to work on personal programming projects compared to an ordinary American college lifestyle; but there are also lifestyle choices you could make that would result in you having more free time for this. In the extreme, you could decide to live as the coding equivalent of a starving artist, working just enough at irregular jobs to have the money to keep yourself barely fed and clothed and buy a laptop with, so you can focus on your coding. I’m not necessarily advocating this kind of lifestyle, but it’s important to be aware that if doing something is important enough to you, you have the power to restructure your life around doing that thing, even if it goes against social norms.

                                                          2. 3

                                                            Have you ever tried Dillo?

                                                            1. 2

                                                              I hadn’t! I just built and ran it and was pretty impressed with what they’ve done so far. It’s definitely not a finished product (or maybe it’s just finicky on MacOS), but it would be fun to contribute to and mess around with.

                                                          3. 4

                                                            You can also use Firefox+uBO+uMatrix on Android! It really makes a huge difference on battery life for me.

                                                            1. 2

                                                              µMatrix works on mobile?

                                                              1. 3

                                                                Yes, the new WebExtensions-style addons work on Firefox for Android. Unfortunately addons don’t work on Firefox for iOS (which is basically a reskinned Safari, not the Gecko engine).

                                                                The uMatrix UI shows up in a new tab rather than a popup, but it looks and acts the same as on desktop.

                                                              2. 1

                                                                For now…Mozilla will replace the current android version of Firefox with fennec (Firefox preview) which currently only supports uBO. I don’t know what the timeline for full webextension support is, but I believe there will be a period without addons :/

                                                            1. 12

                                                              The same can be said about operating systems, which web browsers are essentially becoming (or have been). Casey Muratori calls it the thirty-million-line problem.

                                                              1. 13

                                                                I think this is an often overlooked but crucial fact of the modern Web. The Web started off as a document browsing system, a way to read text content stored on a network. It has quickly become a distributed system with browsers being the client OSs. Browsers provide memory management, hardware management, isolation between processes, and generally expose lower-level capabilities and resources through an API. All of these tasks are things an OS does.

                                                                I think that the Web is a classic case of computers moving too fast. While I’m glad that the modern Web has changed the world in the ways it has, I think the points the author makes are an indication that we often run into the limitations of trying to build a distributed operating system on top of a document sharing system.

                                                              1. 18

                                                                Apparently I’m in the minority here, but thank god. Npm is too important to too many builds to be left in the hands of an independent company that owed investors and needed to monetise the network somehow. Microsoft the tools vendor has a long history of good works, and Microsoft the corporate steward has a recent history of mostly doing the right thing. Here’s hoping they can steer the product away from some of the questionable decisions of the past and into a more sustainable future.

                                                                1. 4

                                                                  I’m with you. I’m glad that npm has a stable home now. For better or for worse, it’s an cornerstone of the modern Web and its disappearance would throw modern development into chaos. I also agree that MS has shown a good track record for being a steward of Open Source. Without companies like them, it’s hard to maintain these common resources.

                                                                1. 1

                                                                  Enjoyed reading this! Do you find that it’s worth it to run/maintain your own personal infrastructure? The various apps and sites I’ve built and maintain are on cloud providers, which has been really great from a plug ‘n play point of view. I’m interested in setting up something like what you’ve described, at least for the sake of learning about the tools and getting the chance to implement some of my own tooling, but feel like it might be more trouble than it’s worth.

                                                                  1. 3

                                                                    I’m glad to hear you enjoyed it :)

                                                                    If it’s worth it, I don’t know I guess it depends on your priority. I think it boils down to my personality. I hate to rely on people and to feel I owe someone so I don’t really use some random orgs services. I did it in the past and I’m glad that when something is broken, I can go and fix it myself (of course to an extent). I don’t like (nor trust) companies (as you can see with the joke about google killing their services). I tend to be paranoid security wise, I think about surely way too many threats (while being reasonable, i.e. the NSA is not one of them). Therefore, hosting my own stuff is not really a choice ;)

                                                                    And to be honest, part of it is also it really helps getting a job (as I work as a sysadmin/devops/SRE/whatever the current trend names it).

                                                                    I do enjoy doing it but it’s not 100% pleasure. I guess it’s like cooking: I don’t always enjoy it, but I feel like I have to, and most of the time, I enjoy the result!

                                                                    Scratch your own itch and try to have fun while doing so!

                                                                    1. 1

                                                                      Makes sense! I think this would be a really cool project for after I graduate and have more free time (which is soon thank goodness)!

                                                                  1. 9

                                                                    Love me some xv6! I was in the Operating Systems class at Georgia Tech last semester which used xv6 and MIT’s curriculum. Hacking on xv6 was what really got me into systems programming! My final project was implementing libc for xv6, and that project alone taught me more about computing than many other classes have. It’s a lot of fun to poke around with and I when I get more free time I’m definitely going to go back and tinker with it some more!