Earlier quoted context omitted.
From my limited exposure to designers, I've learned that they think lower contrast strains reader's eyes less than high contrast does. Black on white is thought to be too striking to read comfortably. Here is a post from 2012 explaining why it's important to use a dark grey instead of a pure black: https://ianstormtaylor.com/design-tip-never-use-black And I agree. Pure black often looks bad. Light gray is even worse.
I wonder if this rule of thumb will change when OLEDs are most common displays. It seems like it might be worth taking advantage of OLEDs ability to do unlit black.
One Way to Improve Your Coding
31–40 of 121 posts
Re: One Way to Improve Your Coding
#32Earlier quoted context omitted.
Coming from Visual Studio, my impression is that a proper IDE should do all those things you mentioned. (minus annotations, but that's what comments are for) I am curious as to why you would want a read-only IDE though. I'd like to see what would be different if the IDE's focus was for reading a large code base rather than writing one.
You're right, of course. I guess what I'm really longing for is ease-of-use and ease-of-setup. For ease-of-use, the default action is navigation (just like reading a web page) so that I can drill-down and mentally execute code not unlike being in a debugger. For ease-of-setup, I don't necessarily want to clone something, create tag files, and possibly install a language mode... I just want to read. Perhaps this seems…
The point of reading code is to understand it. How to read code efficiently depends also on language and coding style. Which would require full blown IDEs just for proper code navigation. And honestly: If setting up an IDE for the language you want to read is too much trouble, programming is and therefore there is no need to read code at all.
EDIT: When I review code that reads like a book, the programmer immediately makes into my hall of fame. Such code is so rare that its coders should be paid their weight in gold - per hour.
Re: One Way to Improve Your Coding
#33Can anyone recommend good tools for reading code? I find github.com to be very klunky for this purpose, and even emacs/vim make the task much more troublesome than it could be. Is there such a thing as a "read-only IDE" anywhere out there? (Ideally features would include click-to-definition, navigate back and forth, add bookmarks and annotations.)
Coming from Visual Studio, my impression is that a proper IDE should do all those things you mentioned. (minus annotations, but that's what comments are for) I am curious as to why you would want a read-only IDE though. I'd like to see what would be different if the IDE's focus was for reading a large code base rather than writing one.
One reason a website might be more handy is skimming codebases you don't actually intend to build and compile. I do this to new projects all the time to stuff I see here (generally on GitHub). I'll also often look into the cPython codebase because I use Python, but it's very rare I have the need to download and build it.
Re: One Way to Improve Your Coding
#34Can anyone recommend good tools for reading code? I find github.com to be very klunky for this purpose, and even emacs/vim make the task much more troublesome than it could be. Is there such a thing as a "read-only IDE" anywhere out there? (Ideally features would include click-to-definition, navigate back and forth, add bookmarks and annotations.)
Re: One Way to Improve Your Coding
#35This is one thing I need to do more often. I came from a school and industry segment (.Net) that very highly discourages reading other people's code, and even years later I feel guilty trying to read jQuery's source when I run into a weird edge case. Is there projects out there that are easy for beginner code readers to grok? I've tried reading libraries you've all heard of, but even after an hour of jumping between…
That said, here are a couple suggestions. I'm not sure what you use other than C# (and Javascript?) so I'm just gonna link things from several languages.
redis-rb [1] is the 'official' Ruby client for redis. (For that matter, I've always heard that redis itself [2] is a good example of C code.) React's source [3] is rather difficult to figure out, but the team recently released a codebase overview [4] which might help. Alternatively, preact [5] is relatively straightforward, and IMO is a good example of structuring an ES6 codebase.
Rails [6] is ridiculously huge, and has established a bunch of its own conventions for file loading, but on the flip-side it is extremely well documented. To take a single bite of the elephant, take a look at its ActiveJob [7] sub-framework.
1: https://github.com/redis/redis-rb
2: https://github.com/antirez/redis
3: https://github.com/facebook/react
4: https://facebook.github.io/react/contributing/codebase-overv...
5: https://github.com/developit/preact
Re: One Way to Improve Your Coding
#36I feel like I learned sane C++ by reading LLVM code.
Re: One Way to Improve Your Coding
#37I'm going to be "that guy" in the comments section this time, largely because I feel like I've been seeing this more recently and I've had to fix it myself: I don't really get why it seems to be a "thing" recently for websites to have low-contrast text colors. This is at least the second time in a week I've seen light gray text on white background, and to not strain my eyes I went into the CSS for the website and fix…
This site[1] says it's because people conflate content with illustration. It also cites Hacker News as an offender (although looking at their screenshot to what I'm seeing, I think it was "fixed") [1] http://contrastrebellion.com/
Re: One Way to Improve Your Coding
#38This is a bit too simple: writing more of the same, in the same style, usually won't cut it and unfortunately I've seen people being stuck like that for years: always producing more code, without any improvement whatsoever and instead just repeating the same mistakes. Once those mistakes become a habit they are extra hard to get rid of. So actually writing more code can be worse :]
What you really should be doing is write more and from time to time different code, combined with learning through either reading others' or continuously asking yourself 'how can I improve this' followed by e.g. a trip to StackOverflow to find out.
Re: One Way to Improve Your Coding
#39Earlier quoted context omitted.
You're right, of course. I guess what I'm really longing for is ease-of-use and ease-of-setup. For ease-of-use, the default action is navigation (just like reading a web page) so that I can drill-down and mentally execute code not unlike being in a debugger. For ease-of-setup, I don't necessarily want to clone something, create tag files, and possibly install a language mode... I just want to read. Perhaps this seems…
> Perhaps this seems a bit lazy, but I think of reading code as similar to reading books or articles: not everything is worth the same level of investment. The point of reading code is to understand it. How to read code efficiently depends also on language and coding style. Which would require full blown IDEs just for proper code navigation. And honestly: If setting up an IDE for the language you want to read is too…
There are varying levels of understanding (or desires to understand something). I use Python a lot. For a lot of the language and libraries my understanding is superficial; dicts have key/values, lists are ordered and mutable. As I use it more I'll dig more into specific parts as needed; how do lookups happen for a dict, how are lists allocated? If I downloaded cPython and read it top to bottom trying to understand everything I likely wouldn't retain those relevant parts I need. I also don't need to download and build all of cPython to answer most of those questions.
Also, new projects get posted all of the time here. I'm curious about other languages and frameworks not because I need to know and understand everything, but I'm curious how I can approach something in a new way. It'd be nice to have a browsable interface on the web.
Your argument here sounds like it would be against having syntax highlighting in anything that's not an IDE (like GitHub) because if you cared enough, just download it and open it in an IDE.
Re: One Way to Improve Your Coding
#40I'm going to be "that guy" in the comments section this time, largely because I feel like I've been seeing this more recently and I've had to fix it myself: I don't really get why it seems to be a "thing" recently for websites to have low-contrast text colors. This is at least the second time in a week I've seen light gray text on white background, and to not strain my eyes I went into the CSS for the website and fix…
I've been a UX designer for 10 years and I can tell you why. (Or at least why from point of view.) It's a deprecated design practice to make font rendering looks smoother in a world where retina screens were not ubiquitous. Back in the old days (so like 3 years ago) before the majority of screens were 'retina' (aka you can't see the pixels at normal viewing distances) fonts always rendered with jagged edges. Turning…
On desktop, the Firefox Hardware report [1] tends to show that they the most common resolutions are 1366 * 768 and 1920 * 1080, this unfortunately doesn't tell us if those are retina screens or not, but from [2] it seems that we're talking about at most 17% as a 'retina' display would report as 1920 * 1080