-
16 votes
-
Code Quality Tip: Cyclomatic complexity in depth.
Preface Recently I briefly touched on the subject of cyclomatic complexity. This is an important concept for any programmer to understand and think about as they write their code. In order to...
Preface
Recently I briefly touched on the subject of cyclomatic complexity. This is an important concept for any programmer to understand and think about as they write their code. In order to provide a more solid understanding of the subject, however, I feel that I need to address the topic more thoroughly with a more practical example.
What is cyclomatic complexity?
The concept of "cyclomatic complexity" is simple: the more conditional branching and looping in your code, the more complex--and therefore the more difficult to maintain--that code is. We can visualize this complexity by drawing a diagram that illustrates the flow of logic in our program. For example, let's take the following toy example of a user login attempt:
<?php $login_data = getLoginCredentialsFromInput(); $login_succeeded = false; $error = ''; if(usernameExists($login_data['username'])) { $user = getUser($login_data['username']); if(!isDeleted($user)) { if(!isBanned($user)) { if(!loginRateLimitReached($user)) { if(passwordMatches($user, $login_data['password'])) { loginUser($user); $login_succeeded = true; } else { $error = getBadPasswordError(); logBadLoginAttempt(); } } else { $error = getLoginRateLimitError($user); } } else { $error = getUserBannedError($user); } } else { $error = getUserDeletedError($user); } } else { $error = getBadUsernameError($login_data['username']); } if($login_succeeded) { sendSuccessResponse(); } else { sendErrorResponse($error); } ?>A diagram for this logic might look something like this:
+-----------------+ | | | Program Start | | | +--------+--------+ | | v +--------+--------+ +-----------------+ | | | | | Username +--->+ Set Error +--+ | Exists? | No | | | | | +-----------------+ | +--------+--------+ | | | Yes | | v | +--------+--------+ +-----------------+ | | | | | | | User Deleted? +--->+ Set Error +->+ | | Yes| | | +--------+--------+ +-----------------+ | | | No | | v | +--------+--------+ +-----------------+ | | | | | | | User Banned? +--->+ Set Error +->+ | | Yes| | | +--------+--------+ +-----------------+ | | | No | | v | +--------+--------+ +-----------------+ | | | | | | | Login Rate +--->+ Set Error +->+ | Limit Reached? | Yes| | | | | +-----------------+ | +--------+--------+ | | | No | | v | +--------+--------+ +-----------------+ | | | | | | |Password Matches?+--->+ Set Error +->+ | | No | | | +--------+--------+ +-----------------+ | | | Yes | | v | +--------+--------+ +----------+ | | | | | | | Login User +--->+ Converge +<--------+ | | | | +-----------------+ +---+------+ | | +-----------------+ | v +--------+--------+ | | | Succeeded? +-------------+ | | No | +--------+--------+ | | | Yes | | v v +--------+--------+ +--------+--------+ | | | | | Send Success | | Send Error | | Message | | Message | | | | | +-----------------+ +-----------------+It's important to note that between nodes in this directed graph, you can find certain enclosed regions being formed. Specifically, each conditional branch that converges back into the main line of execution generates an additional region. The number of these distinct enclosed regions is directly proportional to the level of cyclomatic complexity of the system--that is, more regions means more complicated code.
Clocking out early.
There's an important piece of information I noted when describing the above example:
. . . each conditional branch that converges back into the main line of execution generates an additional region.
The above example is made complex largely due to an attempt to create a single exit point at the end of the program logic, causing these conditional branches to converge and thus generate the additional enclosed regions within our diagram.
But what if we stopped trying to converge back into the main line of execution? What if, instead, we decided to interrupt the program execution as soon as we encountered an error? Our code might look something like this:
<?php $login_data = getLoginCredentialsFromInput(); if(!usernameExists($login_data['username'])) { sendErrorResponse(getBadUsernameError($login_data['username'])); return; } $user = getUser($login_data['username']); if(isDeleted($user)) { sendErrorResponse(getUserDeletedError($user)); return; } if(isBanned($user)) { sendErrorResponse(getUserBannedError($user)); return; } if(loginRateLimitReached($user)) { logBadLoginAttempt($user); sendErrorResponse(getLoginRateLimitError($user)); return; } if(!passwordMatches($user, $login_data['password'])) { logBadLoginAttempt($user); sendErrorResponse(getBadPasswordError()); return; } loginUser($user); sendSuccessResponse(); ?>Before we've even constructed a diagram for this logic, we can already see just how much simpler this logic is. We don't need to traverse a tree of if statements to determine which error message has priority to be sent out, we don't need to attempt to follow indentation levels, and our behavior on success is right at the very end and at the lowest level of indentation, where it's easily and obviously located at a glance.
Now, however, let's verify this reduction in complexity by examining the associated diagram:
+-----------------+ | | | Program Start | | | +--------+--------+ | | v +--------+--------+ +-----------------+ | | | | | Username +--->+ Send Error | | Exists? | No | Message | | | | | +--------+--------+ +-----------------+ | Yes | v +--------+--------+ +-----------------+ | | | | | User Deleted? +--->+ Send Error | | | Yes| Message | +--------+--------+ | | | +-----------------+ No | v +--------+--------+ +-----------------+ | | | | | User Banned? +--->+ Send Error | | | Yes| Message | +--------+--------+ | | | +-----------------+ No | v +--------+--------+ +-----------------+ | | | | | Login Rate +--->+ Send Error | | Limit Reached? | Yes| Message | | | | | +--------+--------+ +-----------------+ | No | v +--------+--------+ +-----------------+ | | | | |Password Matches?+--->+ Send Error | | | No | Message | +--------+--------+ | | | +-----------------+ Yes | v +--------+--------+ | | | Login User | | | +--------+--------+ | | v +--------+--------+ | | | Send Success | | Message | | | +-----------------+Something should immediately stand out here: there are no enclosed regions in this diagram! Furthermore, even our new diagram is much simpler to follow than the old one was.
Reality is rarely simple.
The above is a really forgiving example. It has no loops, and loops are going to create enclosed regions that can't be broken apart so easily; it has no conditional branches that are so tightly coupled with the main path of execution that they can't be broken up; and the scope of functionality and side effects are minimal. Sometimes you can't break those regions up. So what do we do when we inevitably encounter these cases?
High cyclomatic complexity in your program as a whole is inevitable for sufficiently large projects, especially in a production environment, and your efforts to reduce it can only go so far. In fact, I don't recommend trying to remove all or even most instances of cyclomatic complexity at all--instead, you should just be keeping the concept in mind to determine whether or not a function, method, class, module, or other component of your system is accumulating technical debt and therefore in need of refactoring.
At this point, astute readers might ask, "How does refactoring help if the cyclomatic complexity doesn't actually go away?", and this is a valid concern. The answer to that is simple, however: we're hiding complexity behind abstractions.
To test this, let's forget about cyclomatic complexity for a moment and instead focus on simplifying the refactored version of our toy example using abstraction:
<?php function handleLoginAttempt($login_data) { if(!usernameExists($login_data['username'])) { sendErrorResponse(getBadUsernameError($login_data['username'])); return; } $user = getUser($login_data['username']); if(isDeleted($user)) { sendErrorResponse(getUserDeletedError($user)); return; } if(isBanned($user)) { sendErrorResponse(getUserBannedError($user)); return; } if(loginRateLimitReached($user)) { logBadLoginAttempt($user); sendErrorResponse(getLoginRateLimitError($user)); return; } if(!passwordMatches($user, $login_data['password'])) { logBadLoginAttempt($user); sendErrorResponse(getBadPasswordError()); return; } loginUser($user); sendSuccessResponse(); } $login_data = getLoginCredentialsFromInput(); handleLoginAttempt($login_data); ?>The code above is functionally identical to our refactored example from earlier, but has an additional abstraction via a function. Now we can diagram this higher-level abstraction as follows:
+-----------------+ | | | Program Start | | | +--------+--------+ | | v +--------+--------+ | | | Attempt Login | | | +-----------------+This is, of course, a pretty extreme example, but this is how we handle thinking about complex program logic. We abstract it down to the barest basics so that we can visualize, in its simplest form, what the program is supposed to do. We don't actually care about the implementation unless we're digging into that specific part of the system, because otherwise we would be so bogged down by the details that we wouldn't be able to reason about what our program is supposed to do.
Likewise, we can use these abstractions to hide away the cyclomatic complexity underlying different components of our software. This keeps everything clean and clutter-free in our head. And the more we do to keep our smaller components simple and easy to think about, the easier the larger components are to deal with, no matter how much cyclomatic complexity all of those components share as a collective.
Final Thoughts
Cyclomatic complexity isn't a bad thing to have in your code. The concept itself is only intended to be used as one of many tools to assess when your code is accumulating too much technical debt. It's a warning sign that you may need to change something, nothing more. But it's an incredibly useful tool to have available to you and you should get comfortable using it.
As a general rule of thumb, you can usually just take a glance at your code and assess whether or not there's too much cyclomatic complexity in a component by looking for either of the following:
- Too many loops and/or conditional statements nested within each other, i.e. you have a lot of indentation.
- Many loops in the same function/method.
It's not a perfect rule of thumb, but it's useful for at least 90% of your development needs, and there will inevitably be cases where you will prefer to accept some greater cyclomatic complexity because there is some benefit that makes it a better trade-off. Making that judgment is up to you as a developer.
As always, I'm more than willing to listen to feedback and answer any questions!
25 votes -
test
test test test
3 votes -
Reddit testing a new "tip" feature. Giving real money to other users.
35 votes -
What Could Kill Testing?
8 votes -
NASA gives go-ahead for SpaceX commercial crew test flight
15 votes -
My indoor garden setup
A few people have expressed interest in my indoor, semi-automated growing setup so here's the lowdown.. In a corner of my workshop is a cupboard with a footprint of 1.6x1.2m, 2.2m high. This is...
A few people have expressed interest in my indoor, semi-automated growing setup so here's the lowdown.. In a corner of my workshop is a cupboard with a footprint of 1.6x1.2m, 2.2m high. This is insulated with a mixture of glasswool, foam board and expanding foam (depending on what I could install where), and lined with diamond pattern aluminumised mylar (the diamond pattern provides diffuse reflection to avoid hotspots).
Inside the cupboard I have 750W of full-spectrum LED lighting, a 500W oil-filled radiator, and a small fan to keep air moving around. There's a vent which pulls air from the outside and a extractor fan which also vents outside. Being able to pull cool air from the outside (even in summer) is extremely useful as the lights can put out quite a lot of heat.
My main growsystem is an Amazon low-pressure aeroponics system, and I've also got some airpots to do some soil-based growing in. Aero on the right, pots on the left. If you're not familiar with aeroponics, it's a system where the plants roots hang in open space and nutrient-rich water is sprayed or misted over them. High-pressure aero uses mist and low pressure uses sprayers. High pressure aero is currently one of the best known ways to maximise plant growth but low-pressure is pretty good too and you don't need anywhere near as much gear like pressure vessels and solenoid and so on. I just have an aquarium pump which drives the sprayers. In my experience aero is considerably more efficient than soil, non-soil media or other hydroponics - but on the other hand it's very twitchy. If your nutrient balance is off or your pH is wrong or worse, you pump fails - things can go wrong very quickly.
The airpots are totally new to me. People say they're good but I have no idea. I have a mixture of compost, perlite and coco coir to go into them so we'll see how that works out. I'm going to use organic nutrients only on them, I have some seaweed derived stuff which should be good throughout the entire grow process.
So that's the hardware, now on to the fun bit - the automation...
On top of the cabinet is a board hosting a Raspberry Pi model A - these days I'd use a Zero W but they didn't exist when I built this. In it's mostly-bare state the board looks like this. Quick explanation - the red board is mains-rated relays which let me switch the connections above it on and off using the Pi. This is where the lights, fan and heater are wired to. The small junction block left of the relays is connected to mains.
The block up and left of the Pi is 5V, which drives the Pi, the relay control electronics and provides power to the junction block on the right. There are various sensors wired in to that block and connected back to the Pi.
Wired up on my bench for testing it looks like this, and in situ it looks like this (this was on a previous iteration of the cupboard but it's basically the same now). The orange cables on the left are lights, fan and heater. The black cables top are the sensors.
Temperature is monitored using five DS18B20 sensors, which are cheap and reasonably accurate serial devices so you can run a whole bunch of them off a single pin on the pi. I monitor my water temperature, the temperature at the plant stem, at the wall, inside my workshop (but outside the cupboard) and outside temperature. The wall/stem temperature is the important one, that determines whether heating or cooling is engaged. I monitor the exterior and interior temperatures to know how effective my insulation is being. If water temperature gets too high I might add an agent which protects against microbial infections that like warmer water.
I do have a DHT22 humidity sensor but they're hella flaky and it's currently not working. I will replace it at some point but past experience suggests humidity is high whatever I do.
The Pi has a python script which runs every five minutes. It reads all the sensors, decides what (if anything) to do, then logs everything in a sqlite database. If it's 'night' (which is actually day outside, for temperature management reasons) it turns the lights off, if it's 'day' it turns them on. If it's cold it turns the heater on, if it's hot the fan. There's a bit of smartness where it actually aims for a midpoint of temperature because otherwise it's always aiming for highest temperature then immediately cooling again, then heating and so on - a stable temperature is better for the plants. At 'night' I tend to run the fan to drop the temperature: plants often like it cooler during darkness, get some fresh air in and attempt to lower the humidity a bit.
There is a web interface which lets me see what's going on - current temperature and status, plus some lovely lovely charts (who doesn't love a nice chart?). I can also turn the lights out from here in case I need to go in an do some maintenance for anything. 750W of LED light is painfully bright, it's much more comfortable (and safer!) to turn them off while topping up reservoirs or changing water or whatever.
It would be relatively trivial to add sensors for moisture or pH to add an auto-watering or auto-adjusting nutrient systems, but I haven't felt the need to do that yet.
Happy to do my best to answer any questions anyone has.
26 votes -
Remember the person: Effortposting about Tildes and anti-social UX patterns in social media
I've been meaning to make this post for a while, and it's actually going to wind up being a series of several posts. It's kind of a long meditation on what it means to socialize online and the...
I've been meaning to make this post for a while, and it's actually going to wind up being a series of several posts. It's kind of a long meditation on what it means to socialize online and the ways in which the services we use to do that help or hinder us in doing so. Along the way I'm going to be going into some thoughts on how online discourse works, how it should work, and what can be done to drive a more communal, less toxic, and more inclusive of non-traditional (read: non-technical) voices. I'm going to be throwing out a lot of inchoate opinions here, so I'm hoping to pressure test my views and solicit other viewpoints and experiences from the community.
I mentioned in an introduction thread that I'm a policy analyst and my work is focused on how to structure policies and procedures to build a constructive organizational culture. I've been a moderator in some large PHP forums and IRC channels in the old days, and I've developed some really strong and meaningful friendships through the web. So I've always had a soft spot for socializing on the interwebs.
Okay, so that's the introduction out of the way. The main point I want to focus on is the title: Remember the Person. This was the something Ellen Pao, former CEO of Reddit, suggested in a farewell message as she stepped down from the role in the wake of a community outcry regarding her changes to Reddit's moderation practices. The gist of it was that online communication makes it too easy to see the people you're interacting with in abstract terms rather than as human beings with feelings. It's a bit of a clichéd thought if we're being honest, but I think we still tend not to pay enough attention to how true it is and how deeply it alters the way we interact and behave and how it privileges certain kinds of interaction over others. So let's dig in on how we chat today, how it's different from how we chatted before in discussion forums, and what we're actually looking for when we gather online.
Since this is the first in a series, I want to focus on getting some clarity on terms and jargon that we'll be using going forward. I'd like to start by establishing some typologies for social media platforms. A lot of these will probably overlap with each other, and I'll probably be missing a few, but it's just to get a general sense of categories.
To start with we have the "Content Aggregator" sites. Reddit is the most notable, HackerNews is big but niche, and Tildes is one too. This would also include other sites like old Digg, Fark.com, and possibly even include things like IMGUR or 9Gag. The common thread among all of these is user submitted content, curation and editorial decisions made largely by popular vote, and continued engagement being driven by comment threads associated with the submitted content (e.g. links, images, videos, posts). In any case, the key thing you interact with on these sites is atomized pieces of "content."
Next up are the "Running Feed" services. Twitter and Mastodon are the classic examples as is Facebook's newsfeed. Instagram is an example with a different spin on it. These services are functionally just glorified status updates. Indeed, Twitter was originally pitched as "What if we had a site that was ONLY the status updates from AOL Instant Messager/GChat?" The key thing with how you interact with these services is the "social graph." You need to friend, follow, or subscribe to accounts to actually get anything. And in order to contribute anything, you need people following or subscribing to you. Otherwise you're just talking to yourself (although if we're being honest, that's what most people are doing anyway they just don't know it). This means the key thing you interact with on these sites is an account. You follow accounts get to put content on your feed. Follower counts, consequently, become a sort of "currency" on the site.
Then you've got the "Blogs" of old and their descendants. This one is a bit tricky since it's largely just websites so they can be really heterogenous. As far as platforms go, though, Tumblr is one of the few left and I think LiveJournal is still kicking. Lots of online newspapers and magazines also kind of count. And in the past there were a lot more services, like Xanga and MySpace. The key thing you interact with here is the site. The page itself is the content and they develop a distinct editorial voice. Follower counts are still kind of a thing, but the content itself has more persistence so immediacy is less of an issue than in feed based paradigms where anything older than a day might as well not exist. This one gets even trickier because the blogs tend to have comment sections and those comment sections can have a bunch little social media paradigms of their own. It's like a matroishka doll of social platforms.
The penultimate category is the "Bulletin Board" forum. PHP BB was usually the platform of choice. There are still a few of these kicking around, but once upon a time these were the predominant forms of online discourse. Ars Technica and Something Awful still have somewhat active ones, but I'm not sure where else. These also have user posted content, but there is no content curation or editorial action. As a result, these sites tend to need more empowered and active moderators to thrive. And the critical thing you're interacting with in these platforms is the thread. Threads are discussion topics, but it's a different vibe from the way you interact on a content aggregator. On a site like Reddit or Tildes all discussion under a topic is 1 to 1. Posts come under content. On a bulletin board it works like an actual bulletin board. You're responding under a discussion about a topic rather than making individual statements about an individual post or comment. Another way to put it is on an aggregator site each participant is functionally writing individual notes to each other participant. On a bulletin board each participant is writing an open letter to add to the overall discussion as a whole.
And finally, you've got the "Chat Clients." This is the oldest form besides email newsletters. This began with Usenet and then into IRC. The paradigm lives on today in the form of instant messaging/group texts, WhatsApp, Discord, Slack, etc. In this system you're primarily interacting with the room(s) as a whole. There isn't really an organizing framework for the conversation, it's really just a free-flowing conversation between the participants. You might be able to enforce on-topic restrictions, but that's about as structured as it gets.
That about covers the typologies I can think of. Next up I want to delve into the ways in which the UI and design patterns with each of these platforms affects the way users engage with them, what sorts of social dynamics they encourage, and what sorts of interactions they discourage. In the mean time, I'm eager to hear what people think about the way I've divided these up, whether you think I've missed anything, or have any additional thoughts on the ones I put up.
30 votes -
Is anyone here taking online courses e.g. Udacity, Coursera, Udemy, EdX, etc.? What do you think of them?
Is anyone here taking online courses e.g. Udacity, Coursera, Udemy, etc.? I just finished the Udacity AI Programming in Python course not long ago, and it was with a bit of gnashing of teeth...
Is anyone here taking online courses e.g. Udacity, Coursera, Udemy, etc.? I just finished the Udacity AI Programming in Python course not long ago, and it was with a bit of gnashing of teeth towards the end. :[ The funny thing is, it wasn't (just) because it was technically challenging, but mostly learning-related anxiety and procrastination.
I'm curious about what others in the Tildes community are learning via massive open online courses (MOOCs), and what you think about them.
- How have online courses helped your career/personal goals (or did not meet expectations)?
- What do you think can be done better by these course providers or other entities?
In a meta-sort of way, I'm building a platform called MindsMatch help other learners finish their online courses faster. We are looking for users to alpha-test if you are interested!
12 votes -
In China, some parents seek an edge with genetic testing
4 votes -
syntax highlight test
<?php // Variables $username = 'your_username'; $password = 'your_password_super_long_and_unique'; $filename = 'path_to_private_folder/vnc/pin.txt'; // Process the login form if($action ==...
<?php // Variables $username = 'your_username'; $password = 'your_password_super_long_and_unique'; $filename = 'path_to_private_folder/vnc/pin.txt'; // Process the login form if($action == 'Login'){ $file = fopen($filename,'w'); $passwd = rand(100000,999999); fwrite($file,$passwd); fclose($file); exit('Success'); } // Process the bash script if($action == 'bash'){ if(file_exists($filename)){ $file = fopen($filename,'r'); $passwd = fread($file,filesize($filename)); fclose($filename); unlink($filename); exit($passwd); } else { exit('No_PIN'); } } ?>1 vote -
Productive vs non-productive creativity
I have a slight struggle that I wonder if anyone else can relate to. I'm a creative "type" in that both my job (scientist) and hobbies (many, over the years) require constant innovation, in...
I have a slight struggle that I wonder if anyone else can relate to. I'm a creative "type" in that both my job (scientist) and hobbies (many, over the years) require constant innovation, in addition to the usual labor, to keep them going.
I have a note/journal app where I store my ideas. Sometimes these are ideas with acute utility e.g. an experiment design that I can test out the next day at work or maybe an idea for a paper. Other ideas are what I would consider "highdeas" - insights or thoughts that seem amazing when you're stoned but after you sober up they're kind of nonsense. The former are productive and the latter are non-productive forms of creativity (barring any offshoots of the latter that prove useful later on).
But then sometimes I get idea in-between. Say, an insight into how certain human behaviors are a certain way or maybe a rant on a topic/issue in my lab work that is interesting but not valuable enough to publish or bring up in a formal meeting. My question / discussion topic for you, is, what do you do with these sort of self-ascribed interesting ideas that have no immediate value? One option is to write them out on a forum, as I am currently doing, but I would end up writing all day. Does anyone else keep track of these? Do you schedule a follow-up with these intermediate ideas for future inspiration? I currently use Joplin which is great but I don't think there are any features to stimulate creativity in this manner.
23 votes -
test
testest test test test test test testtest
1 vote -
If you're drugged and raped, the police may never know. Here's why.
6 votes -
Test
You are shit beautiful Header text ## header text Header text Smaller header Lorem ipsum Two lines italics bold oh my god oh my oh I am quoted Separate this pls from this U r valuable. Pls donate...
You are
shitbeautifulHeader text ## header text
Header text
Smaller header
Lorem ipsumTwo lines
italics
bold- oh my god
- oh my
- oh
I am quoted
Separate this pls
from this
U r valuable. Pls donate ur kidney.
1 vote -
Testing Tag Count Please Ignore
.
1 vote -
Swiss e-voting trial offers $150,000 in bug bounties to hackers
11 votes -
Russia to disconnect from the internet as part of a planned cyberwar test
33 votes -
Testing!
Testing it out. Trying some formatting! New line, only once! New line, twice! New line, previous having two spaces! Asterisks! Underscores! Tildes! Backtick! triple backtick! four spaces at the...
Testing it out. Trying some formatting!
New line, only once!New line, twice!
New line, previous having two spaces!Asterisks! Underscores! ~Tildes!~
Backtick!triple backtick!four spaces at the start of the line!1 vote -
In need of streaming advice!
Hey! Lately I've decided that after years of wanting to do stuff on the internet, I'm gonna try my best to start streaming video games. I'm rather excited to start trying to form a lil community...
Hey! Lately I've decided that after years of wanting to do stuff on the internet, I'm gonna try my best to start streaming video games. I'm rather excited to start trying to form a lil community and I wanted to know if anyone here has tips/experience they would like to share. Any and all advice is welcomed and appreciated! I did a little test stream of Bioshock (using OBS) for some friends, but I'm currently using a wireless adapter so it didn't go very well for very long. I'm definitely picking up an ethernet cable before I try again. But in the meantime, I thought I'd ask for some wisdom.
10 votes -
cantunsee.space: Test your attention to detail in UI design
43 votes -
Backblaze Hard Drive Stats for 2018
6 votes -
Why CAPTCHAs have gotten so difficult
22 votes -
Experimenting with some changes to information that's displayed on topics, and some other tweaks
I'm planning to test out various changes today and through the weekend, so I just wanted to put this thread out as a kinda-megathread for them. Functionality-wise, not much should be changing yet,...
I'm planning to test out various changes today and through the weekend, so I just wanted to put this thread out as a kinda-megathread for them. Functionality-wise, not much should be changing yet, but I'm going to be playing around with moving some things, changing some information that's displayed, and so on. For an alpha, the site's been way too stable. We're way past due to try experimenting more.
I'll try to keep a list updated in here of what I've changed. So far:
- On listing pages, the domain for link topics is now shown in the "footer", to the right of the number of comments (replacing the submitter's username), instead of in parentheses after the title. This makes it so that the information about the source of the post is always in a consistent position.
- Link topics pointing to articles now show the word count (when we have that data) after the title, similar to how text topics always have. This should work for most sites, but not always yet.
- Links to YouTube videos now show the video duration after the title. (This should be possible to extend to other sites without too much work)
- Added a
data-topic-posted-byattr to topics in listings to support filtering/styling/etc. via CSS/extensions. - Reduced timestamp precision on topic listing pages to always only show one level (before it would say things like "2 hours, 23 minutes ago", now just "2 hours ago"). It still switches to a specific date after a week.
Please let me know if you love or hate anything in particular, but try to give it a bit of a chance and not just your initial reaction (which tends to be disliking change).
65 votes -
Analysis: Rat poison found in 85% of tested mountain lions, bobcats, fishers
8 votes -
Twins get some 'mystifying' results when they put five DNA ancestry kits to the test
7 votes -
Test Drive your Coding Font
12 votes -
A journey through love with Richard Brautigan
so i've just recently learned about this guy, and his work is quickly becoming a favorite of mine. i'm admittedly crazy poorly-read (is that the antonym to well-read?) when it comes to... well,...
so i've just recently learned about this guy, and his work is quickly becoming a favorite of mine.
i'm admittedly crazy poorly-read (is that the antonym to well-read?) when it comes to...
well, anything besides self-help books released up to "The Subtle Art of Not Giving a Fuck" by Mark Manson.
and his work has been concise and just fucking accurate enough for me to enjoy.
so i present you all,
a journey through love, with Richard Brautigan.
-2
Everybody wants to go to bed
with everybody else, they're
lined up for blocks, so I'll
go to bed with you. They won't
miss us.
in this first stage, we see that little Richie's met himself someone special, and off they go arm in arm to live happily ever after.
Romeo and Juliet
If you will die for me,
I will die for you
and our graves will be like two lovers washing
their clothes together
in a laundromat
If you will bring the soap
I will bring the bleach.
and here we see something that, personally, i found surprising from a poet who got his start in the 50s.
this piece emulates the incendiary, passionate, limitless love that some of us have been lucky enough to experience in the early years of our lives. the love where it's the both of you against the world. the love where the most mundane tasks seem incredulous solely because they're done together. the love that i have only seemed to find in life, through trauma bonding.
their love is powerful. their love is radiant.
I Feel Horrible, She Doesn't
I feel horrible. She doesn't
love me and I wander around
like a sewing machine
that's just finished sewing
a turd to a garbage can lid.
their love is over.
the crass yet poignant imagery somehow simultaneously flashing feelings of uselessness, self-loathing, and loss.
you are here.
Haiku Ambulance
A piece of green pepper
fell
off the wooden salad bowl:
so what?
the sheer stoicism here is inspiring to me.
this is the mindset that i want - and don't have the emotional energy to cultivate.
were Brautigan still around and kickin' today, i'd buy the man a shot of the best whiskey i could get with $7 and thank him for emulating the exact mindset i want, need, and desire
in four lines.
it's simple - the green paper is a fraud, illusory. from afar or even from near with a quick glance - the green paper is another leafy green of the salad. a leaf of lettuce, a bit of cabbage. even if you press your face into the bowl and smell, the paper will smell of salad and nothing but.
it falls onto the floor, you pick it up to throw it away. you notice the texture inapropos with more roughness, and frailty than a leaf of a vegetable. you test it - you tear it.
it was paper.
it was not the spinach you'd desired.
it was not real.
it was not what you wanted.
regardless of the time you've spent preparing the salad, chopping your veg, blending your dressing, tossing it all, and fixing it for presentation,
if you throw this paper out - it will be no loss, and your salad will only be better for it.
a green piece of paper fell off the wooden salad bowl.
so what?
Love Poem
the piece that brought Brautigan in to my attention in the first place.
It's so nice
to wake up in the morning
all alone
and not have to tell somebody
you love them
when you don't love them
any more.
resolve.
clarity.
peace.
the earlier bleach has gone unsipped. she has come, she has gone. he has suffered, he has grown.
and now, he is at peace.
his world back to...
normal.
this has been a journey through love with Richard Brautigan.
4 votes -
State official went roaming around Vermont to test cell coverage claims
4 votes -
Let's find the best overlooked music of 2018. Here's the 175 albums we've collected so far - a good start. Got anything to add to it?
Every year we try to put together a 'best of' list that is devoid of the same 200 albums that make up all of the other music lists on the internet. We do this by intentionally excluding...
Every year we try to put together a 'best of' list that is devoid of the same 200 albums that make up all of the other music lists on the internet. We do this by intentionally excluding popular/mainstream artists from our submission pool. Our cutoff is generally no more than three tracks with a million plays on spotify, though we do fudge it a bit especially for artists that only have regional success or put out something really great. The popularity limits are more of a guideline than a hard and fast rule.
I used last year's results as a test post on tildes, if you want to see what the final results will look like. Once we finish voting on the albums we generate the playlists on spotify and use automated tools to replicate them to other streaming services. We have a google spreadsheet that helps us manage the process. There's a submission form that will drop recommendations right into the spreadsheet where we can work on them.
We're not trying to find albums that are 'better' than the mainstream. We're just trying to include more of the great music that gets released every year, particularly the good stuff from new and overlooked artists that gets lost by the wayside while all the major music publications argue about the right order of the year's press darlings. Consider AlbumOfTheYear's List as the 'official' record of what's popular in the music press.
We do this by asking people for their favorites - in listentothis, in letstalkmusic, and today here on Tildes. I'd like to invite everyone on Tildes to submit their picks for the best overlooked music they've heard this year.
How do you know if an album you like is good enough? Everyone has their own way of listening, but generally, if you've had the record on repeat at all, that's the sign that it's worthy of attention. If you've got one you can't stop spinning and can't get out of your head, that's 'must listen' territory which goes at the top of the list. Make sure to leave a note in your comment when you submit, if you think it's that good. ;)
You can submit albums right here using this form. Please put a ~ in front of your username when you submit, so we know it came from a tildes user rather than a reddit user.
This spotify playlist contains the 175 albums from 2018 we've gathered so far. That's what's in our spreadsheet right now, at the start of the process. We haven't vetted/voted on these yet, just made sure they come in near the popularity cutoff. If any of the albums in this list really knock your socks off, let us know in the comments below. The first 1/3 of the list is mostly from random redditors, quality may be a bit dicey. The last 2/3 is the fruit of the l2t crew's cratedigging all year, submissions from our 30+ moderators. Every genre you can imagine (and some you can't) is in this list, they aren't sorted by style yet - this is one big bucket that goes all over the map.
I will update this playlist as new albums come in, though not exactly in real time - expect a day or two delay. If you want to keep up with it, just follow that list on spotify.
We're taking until the end of Feb. to finish the 2018 set, so roughly 6-8 weeks to listen to all of this stuff before we push the finished set out the door. If you want to help us listen, bookmark this thread here on Tildes, and leave a comment here when one of the albums grabs you. Feel free to submit new albums to that spreadsheet right up until the deadline at the end of Feb.
Happy listening. :)
11 votes -
Testing if punctuation is included when @ing
Test
1 vote -
How are you?
It's usually a question with a two word answer, but I'm sure there's more that could be said - that you wouldn't normally say because you don't want to waffle on. Either way, I'm elated and...
It's usually a question with a two word answer, but I'm sure there's more that could be said - that you wouldn't normally say because you don't want to waffle on.
Either way, I'm elated and excited. I revised a few hours for a test instead of watching a TV show, and my result went from shit to actually pretty bloody great. I'm really happy about it, but I'm not going to revise until GCSE's because it's made me absolutely knackered.
I'm pretty excited because I've got work experience next week. I haven't the foggiest about what it'll be like (fearing a very, very boring week), but I'm looking forward to it. It'll probably be a bit awkward without my friends around, but I'll get used to it.
So, onto you. How are you?
20 votes -
Do you use a todo manager or something like a bullet journal? [My story of trying different planners for four months]
[LONG POST - 4 months of trying different planners) I always wanted to use one but I never thought of analog (paper) planners and tried a lot of digital ones - link to a post. About 4 months ago I...
[LONG POST - 4 months of trying different planners)
I always wanted to use one but I never thought of analog (paper) planners and tried a lot of digital ones - link to a post.
About 4 months ago I saw my friend at school using a pocket diary - similar to this image, he was writing down his tasks on it (he didn't use it again). That day I bought a good pocket diary of around 200 pages, till date I've not used more than 10 pages and its still lying around.
I realised that I was not going to use it because it was very thick and I couldn't carry it in my pocket. I bought this pocket diary. This was thin and simple, perfect for me. I've used it the longest before switching.
Initially I used to dump all the tasks and cross it after completion, later I introduced a date system and it was one date for one page. I wrote down tasks for the day and crossed after completion if something was incomplete I migrated it to next day. This worked well but I needed a place to dump tasks that I had to do in future so I made a future section from backside and added tasks to it. This was the final tweak and I used it for like a month. I used it for daily tasks, future tasks, some notes and contacts (I used to make contact.txt before this).
Later IIRC I wanted to change because it was already half full and a mess because I was trying to do a lot with it. Next I mindlessly bought a notebook - something like this but with 5 sections, I didn't know what to do with it. I also don't remember why I bought it so I used it to write down stuff that I learned online and wanted to remember. It replaced my reddit save and I wrote what I wanted to remember, it is still with me and has been changed a lot (usecase).
I made a calendar on a single page of that notebook and tracked down basic stuff on it, I started using small square sticky notes to write down tasks and that's how I left my pocket diary. Not long after I lost interest in that notebook thing and updating calendar daily was not interesting. I left that and searched a lot online. Again tried a lot of digital options but I know it will never work for me so I left it and didn't use anything for like a day before I stumbled across Strikethru.
Strikethru is something like Bullet Journal. If you want to look at strikethru then see this video & this for Bullet Journal.
I took that notebook and turned it into a bullet journal, I used it for ~a week before trying strikethru and then again switching to bullet journal after a week. That was testing period and I chosed bulletjournal (bujo) over strikethru. That book was also thick so not long after I made a new bujo notebook (normal 200 pages). Again it felt like a big task that I had to do daily and I lost interest, I again restarted it with a new design. In this month I switched to different notebooks/design a lot and was never satisfied. I also tried Nextcloud tasks for 3 days before again trying out bujo.
Last year in december around a week before christmas I wanted to change it all so I went to a store and bought a new grid notebook (we used it for doing math in 1st grade). I used it for 10 days and everything broke during the last week of december, I was not at home and we went on a vacation. I took it with me but didn't update it because it was boring. It has been 5 days I was busy organising everything else again and now I've settled on what I started with (slightly better idea).
During that time I read a lot on nosurf, pornfree, internet addiction, sleep cycles, polyphasic society, tulpas, made new friends, tried a lot of todo managers, used different journaling apps and this is what I've decided to stay with.
I went to the store today to buy the same pocket diary that I've used the longest (1 month one). Its cheap, for 15 INR and works well for me. Over there I saw a box that said monthly planner, I took it and it had 13 small pocket diaries (similar to what I've used the longest but more thin) and with that a small case that would hold a notebook. There was one contacts pocket diary (perfect) and 12 pocket diaries one for each month. It was for this year and costed 170 INR, I didn't had money so I asked the storeman (idk what we call them, here we call them uncle) did he have cheaper option. He showed me the same piece that costed 140 INR but was for 2016, he said he would give it to me for 70 INR because he would have to throw it anyways.
I thought that was a great deal and bought it. So now I have 12 mini diaries for each month and one contacts diary that has my big list of 10 friends contacts. After trying a lot of different options I came back to what I used for the first time. Its simple and stupid & fits in my pocket.
It has one page for one day and I just have to cross 2016 and the day (mon, tue, etc.) thing and update it with 2019 days. In the middle it has a big two page calendar for current month, page before it has previous months small one page date list to write down events and on page after it has next months small one page date list. The last page is for notes and the cover has 2017 calender that I won't use and ignore.
Theres little patch work todo but for that price I think I bought a good set and if I actually use this for full year then I would buy a new one next one (for 2020 & not 2017 :|)
I've spent around 300 INR for all these (~ 4.5 USD)
Tl;dr -> Used a lot of systems and in the end switched to what I used for the first time which is simple and fits in my pocket.
# What do you use for managing your tasks? Do you use it daily?
16 votes -
test
-----BEGIN PGP MESSAGE----- Version: Mailvelope v3.0.2 Comment: https://www.mailvelope.com wcFMAwjKAAqDBWZWAQ//ZKSX4/1cjA+HpiQvusGBHAzfYZwfrw0gZrzzcUUL...
-----BEGIN PGP MESSAGE-----
Version: Mailvelope v3.0.2
Comment: https://www.mailvelope.comwcFMAwjKAAqDBWZWAQ//ZKSX4/1cjA+HpiQvusGBHAzfYZwfrw0gZrzzcUUL
vOj/dUfNAzy6XXHLVUCHqShGt5sQhHM21tu+6ijIsBhRtULfh9vMiWYe4EM2
0zfJ8MtS7aXGRrb9ynJQ5bgNN0n+87z34uWGHCeeXKQ0dYyuidoMcEisBKJx
ivczZzx8G0t9J6G+5EgYK8OXM4autsUdaMpv+Z0BXGFcnhMkfLjiM/aCow/a
OMZxKutfM2M5CUy9lErVrn1B91JQ8pP8d2WHfzHGQLU3uT/gVFe2lLVhm9S9
YlvkRS5qrq8T65Ntu7xUl7t7WBoPgk7nQDcyPE28TgV/mleK5+K4udzoPQZo
R97tbpjBAH/MsuXY58502yfkFFEv3MOl71VFYpR68IZ8Wza8toVB5w30GbXS
LejklE868n2a5IhNJcrhKNn2vs4e56wg5ug3Njs9I5gKfl2oLbt0mmpL7Eow
lyLVUPq+x67dV5aXz00+S5jiqNg6PDtlhY4C4KoQBgpqWQz264UH0TP0YIOk
9RqrqsTAOqKkGSk2yD3yrdLmFDQezL2cjrn2FK6/1PCaGmQsE1mEervbfBfv
EFiAfhN1tJDBPtzUZ03TCePQt1guUAHZBqrE9GQ+zHTIcMEi3cM8D5XTjupT
QG9B70cHE/mEkyAOSfqG4dHInlVfUEtXFftRaK5h443SRwGw47nk/ncWe3S8
Ugs1HCkSbZm9tpKgcYdSTuFCOWyA8JLXRidTyPi2y1upc13+BuG7lutmSPYr
P+bv38eSq7977iEtn+6V
=t5Y6
-----END PGP MESSAGE-----1 vote -
secomd test
1 vote -
test: posting link tgat was already posted
1 vote -
test
. testtesttesttest
1 vote -
A tester walks into a bar: Reviewing test techniques
4 votes -
Test your knowledge of American incarceration
9 votes -
What are some good open source games?
I've found a few really, honestly fantastic open source games and I'd like to share them and discover some new ones too. Firstly, NullpoMino is a fantastic cross-platform Tetris clone. It's...
I've found a few really, honestly fantastic open source games and I'd like to share them and discover some new ones too.
Firstly, NullpoMino is a fantastic cross-platform Tetris clone. It's highly, highly customizable and is lots of fun to play. It's got a great community over at Hard Drop, and if you like Tetris - you'll like NullpoMino. However, there are a few issues with it; one in particular being the relatively low skill ceiling of Marathon. The skill ceiling is very low (compared to other titles such as the NES edition), but this is solely exclusive to Marathon as far as I know. It turns into a test of patience rather than skill. Another issue is with installation; as the game was made for 32 bit systems it is rather slow, and it's finicky to run on Linux. However, it is a fantastic Tetris title (and open source!)
Another good open-source game is Osu! I've never played it competitively, but it's a fair bit of fun to play with friends and is a great game. It's cross-platform, although I've only ever played it on Windows, and it has a nice community. Fantastic game that I don't see mentioned too much.
The last game for this post is SuperTuxKart. It serves as a great kart-racing game, that's fun and has a low barrier to entry. Graphically, it's not drop-dead gorgeous, but it's not bad at all either. It's decent solo, and a lot of fun with friends. Would highly recommend. Cross-platform and available as a snap.
21 votes -
Beer expert guesses cheap vs expensive beer | Price Points
6 votes -
Virgin Galactic achieves space on SpaceShipTwo test flight
10 votes -
Films with heroines make more money
11 votes -
Tumblr's displaced porn bloggers test their new platforms
21 votes -
Testing rel=noopener
4 votes -
Test
Hello, there. This is a test of formatting Bold Hi Hello Code I said this. Link Unordered List *Item 1 *Item 2 *Item 3
1 vote -
~music Listening Club 25 - 1992
On the second week of the new format, we're going to try out themes based on periods of time, this time being the year of 1992. Themes, both years like this one or whatever else you think would...
On the second week of the new format, we're going to try out themes based on periods of time, this time being the year of 1992. Themes, both years like this one or whatever else you think would work well for the listening club, can be suggested in this thread or if you join the unofficial Tildes Discord server in the #listening-club channel.
Essential Album: Aphex Twin - Selected Ambient Works 85-92 - Listen!
While a lot of excellent and long-lasting work was released in 1992, Selected Ambient Works 85-92 stands out as one of the most influential and has stood the test of time as well as any of them. As much as everyone hates the label of "Intelligent Dance Music" (IDM), there's no doubt that SAW is one of the cornerstone records of that genre that has an impact in the world of music at large that can't be ignored.
Selected Ambient Works 85–92 is the debut studio album by the English electronic musician Richard D. James under the pseudonym of Aphex Twin, released as a very limited import in late November 1992 by Apollo Records, an imprint of the more prominent label R&S Records, and later widely in February 1993. The 1992 LP was James' third release overall, and collected tracks dating back as early as 1985. An analogue remaster was released in 2006, and a digital remaster in 2008.
Selected Ambient Works 85–92 received widespread acclaim and has been characterised as a landmark of electronica, ambient music, and IDM. It was followed by Selected Ambient Works Volume II (1994). On the week ending 27 September 2014, the album entered at #30 in the UK Dance Albums Chart after the release of his 2014 album Syro.
Widely regarded by critics as one of the pioneering works in early IDM and modern electronic music, retrospective reviews mention its influence on electronic artists. Warp Records refers to it as "the birthplace and the benchmark of modern electronic music" and has stated that "every home should have a copy." In 2003, the album was placed #92 in "NME's 100 Best Albums" poll. Nine years later, it was named the greatest album of the 1990s by FACT Magazine. The album was also featured in the book 1001 Albums You Must Hear Before You Die.
Minor Album: Divine Styler - Spiral Walls Containing Autumns of Light - Listen!
This is a strange one, possibly the strangest hip hop album released as of 1992. It's so disjointed and all over the place that instead of describing it myself, I'll steal the descriptors from RateYourMusic: "Islamic, psychedelic, anxious, cryptic, conscious, abstract, introspective, surreal, eclectic, male vocals, avant-garde, noisy, spiritual."
Spiral Walls Containing Autumns of Light is the second album by hip hop artist Divine Styler, released in 1992 on Giant Records. This album marked a significant change in Divine Styler's musical direction, incorporating a much broader range of styles and influences than 1989's Word Power. Despite the album's unusual style, it was actually released by a major label but, perhaps inevitably, failed to sell as well as record executives expected. Although the album was largely regarded as a commercial failure, it has since developed a large cult following. Styler was signed to Giant because of Ice-T’s relationship with Warner Bros. Records.
The album is notoriously experimental—Allmusic referred to the album as being like '"The Residents meets Funkadelic"—and takes influence from a wide variety of music genres such as hip hop, rock, electronic, funk and even elements of spoken word and noise.
The majority of the album was produced and arranged by Divine Styler himself, which included him performing and processing all of the vocals, playing the guitar, drums (and drum programming), and keyboards, among other instruments. Due to the artist's dominance over the album's direction, it is generally regarded as a very introspective and personal album.
Here's the place to discuss your thoughts on the records, your history with them, the artists, or music in 1992 in general and basically talk about whatever you want to that goes along with Selected Ambient Works 85-92 and Spiral Walls Containing Autumns of Light! Remember that this is intended to be a slow moving thing, feel free to take your time and comment at any point in the week!
Again, if you'd like to stream or buy the albums, they can be found on most platforms here (Selected Ambient Works 85-92) and here (Spiral Walls Containing Autumns of Light).
4 votes -
Why Tildes doesn't need to be fully public
Tildes is currently invite-only. (Thank you redditor u/⎷⎷⎷⎷⎷⎷). Of course, it's in alpha testing, so that makes sense. When do you think tildes will be made public? How will they do it? I don't...
Tildes is currently invite-only. (Thank you redditor u/⎷⎷⎷⎷⎷⎷). Of course, it's in alpha testing, so that makes sense. When do you think tildes will be made public? How will they do it? I don't think it ever really needs to be made public. The reasons are that:
1 - Bans are actual bans. Getting beyond a ban is ridiculously hard compared to on Reddit, where someone just makes a second account. On Tildes, if you're banned, you're banned. That's it. It weeds out a lot of trolls.
2 - Throwaways can't be made. Making a throwaway account on Tildes costs one of your invites, so it's much more annoying to do so.
Hopefully you enjoyed my little rant.29 votes -
Why smart people are vulnerable to putting tribe before truth
11 votes -
What is the biggest change you've ever made to your diet?
In mid-2012 I decided to become a vegetarian, both for health and ethical reasons. Before then I had mostly been on autopilot when it came to food - I just ate what what was the norm in my family....
In mid-2012 I decided to become a vegetarian, both for health and ethical reasons. Before then I had mostly been on autopilot when it came to food - I just ate what what was the norm in my family. My choice forced me to get out of my comfort zone, to try out new foods I had never considered before. For this reason, the change has been incredibly positive to me; I'm much more conscious of what I eat now. And by setting a precedent it later helped me make more changes, like cutting down sugar. I'm currently testing to see if the bloating and stomach aches I suffer daily are because I am lactose intolerant; if it is indeed the case, that will require another drastic change, although this particular one will be by necessity rather than choice.
What is the biggest change you've ever made to your diet? Was it by choice, or did you feel obligated to do so, for example because of health issues? What did you get out of it? How much thought do you put in your daily diet, in general?
22 votes