-
8 votes
-
Desk setup / Battlestation Thread.
I am a pretty big fan of the PCMR Battle station posts where everyone shares their computers and desk setups. I have never seen one here so I figured I would start one! Here is my desk, three 32"...
I am a pretty big fan of the PCMR Battle station posts where everyone shares their computers and desk setups. I have never seen one here so I figured I would start one!
Here is my desk, three 32" monitors (two facing the desk, one facing my living room on the back ). I primarily use my lower monitor and have background stuff on the upper (spotify, torrent client, youtube, podcasts, winamp, twitch, discord, etc etc). I have a bunch of old Xbox360 controllers and enjoy playing PC games on the couch on my rear monitor (as well as streaming obviously). The rear monitor also has a firestick and my only source of sound (other than my headset) is an Amazon Echo (which also controls my living room lights). The PC is a prebuilt from iBUYPOWER, it was my first time buying a prebuilt (I was hesitant to do so) and the only reason I did was because I was wanting to build a new rig right as crypto mining was driving up the cost of everything and I was able to get a great deal on this one. So far it has performed great. I still have two RAM slots open so I think that is the next thing I am gonna do.
I built my last computer in 2008 so I was way overdue for a new one and my S.O. has informed me I went a little overboard =)
9200 i7-8700K 6-Core 3.7 GHz | Liquid Cooled | Z370 Motherboard| GeForce GTX 1070 | 16GB DDR4| 1TB HDD | 240GB SSD |
Lets see what you guys have!
EDIT: sorry for the low picture quality, my cell phone is garbage.
EDIT2: forgot to include a screenshot
It's the same background on all three, but the taskbar is basic on the two secondary (and icons are only on the main). And if anyone was confused about the random monitor hanging off of the back of my desk this kinda shows it better.
26 votes -
How Game Apps That Captivate Kids Have Been Collecting Their Data
11 votes -
Night Noise Mix Series #1 - Mántas & Venclà (2018)
4 votes -
~music Listening Club 13 - Paranoid
Hey there! We just hit week 13, and it's time for another classic record discussion: Black Sabbath's Paranoid! Paranoid is the second studio album by the English rock band Black Sabbath. Released...
Hey there! We just hit week 13, and it's time for another classic record discussion: Black Sabbath's Paranoid!
Paranoid is the second studio album by the English rock band Black Sabbath. Released in September 1970, it was the band's only LP to top the UK Albums Chart until the release of 13 in 2013. Paranoid contains several of the band's signature songs, including "Iron Man", "War Pigs" and the title track, which was the band's only Top 20 hit, reaching number 4 in the UK charts. It is often cited as an influential album in the development of heavy metal music.
Here's the place to discuss your thoughts on the record, your history with it or the artist, and basically talk about whatever you want to that goes along with Paranoid. 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!
If you'd like to stream or buy the album, it can be found on most platforms here.
Don't forget to nominate and vote for next week's obscure record in response to this comment!
10 votes -
Leaving Apple & Google: /e/ first beta is here
14 votes -
Leathercraft - Tools of the trade!
12 votes -
Frying Pan Ocean Cam: Hurricane Florence
7 votes -
The OnePlus 6T won't have a headphone jack, but battery life will be improved
16 votes -
The iPhone franchise
4 votes -
[writing challenge]: say nothing.
hey everyone! i was sitting down to write some today, and i kept coming up with lines and lyrics that were great, but for absolute vapid-type songs (gucci gang type stuff hahaha). i thought it...
hey everyone!
i was sitting down to write some today, and i kept coming up with lines and lyrics that were great, but for absolute vapid-type songs (gucci gang type stuff hahaha).
i thought it would make for a fun challenge. whether you want to write a short story, a poem, maybe a little stageplay script - what's the largest amount of words you can use to express absolutely nothing?
whether it be something like the lyrics for lil pump's "D Rose" or something like the internet-famous article "The Rumor Come Out: Does Bruno Mars is Gay?"
how long of a piece of writing can you make, whilst saying absolutely nothing?
6 votes -
How one man is recreating lost colors
13 votes -
Magnetohydrodynamics - Propelling Liquid Metal with Magnets
6 votes -
US Sen. Ben Sasse reveals five point plan to address ethics issues in DC
11 votes -
Maps showing California as an island
9 votes -
Litigation gone digital: Ottawa experiments with artificial intelligence in tax cases
4 votes -
Let's talk about the Myst series
They're all really cool games. Myst, Riven, Exile, Revelations, End of Ages, and Uru. Discuss? Edit: ok and yeah Obduction I guess
11 votes -
Today, Europe lost the internet. Now, we fight back
10 votes -
Ghosts of 'OZ
5 votes -
Honest diversity in tech report
7 votes -
Riot Games says it wants to clean up its mess, but the people who made it are still there
17 votes -
Watch Your Hack
6 votes -
The São Paulo taxi firm that dares to go where Uber doesn't
4 votes -
What do you think about reddits thebanout? Are you supporting it or not, and why?
I personally think that if it doesn't get reigned in, it will destroy a LOT about reddit.
16 votes -
GCHQ data collection violated human rights, Strasbourg court rules. Spies breached right to privacy in programme revealed by Edward Snowden, judges say
10 votes -
Scientific publishing is a rip-off. We fund the research – it should be free
28 votes -
Anyone see the fire on Forest St tonight?
Looks like a fire in out back of one of the vacant houses on that block. There's a bunch of firetrucks outside and they've been working for an hour or so. I'm glad the smoke hasn't blown up north,...
Looks like a fire in out back of one of the vacant houses on that block. There's a bunch of firetrucks outside and they've been working for an hour or so. I'm glad the smoke hasn't blown up north, but we're all very awake so I dunno what we're gonna do now.
10 votes -
Occitan, the language the French forbade
10 votes -
Now that the Copyright Directive has been voted through, I think it's relevant to share what type of MP's voted for this crap...
Original here: https://old.reddit.com/r/europe/comments/8sizc8/danish_mep_jens_rohde_in_facebook_post_yesterday/ I posted this on reddit a couple of months ago as I felt (and still feel) like it's...
Original here: https://old.reddit.com/r/europe/comments/8sizc8/danish_mep_jens_rohde_in_facebook_post_yesterday/
I posted this on reddit a couple of months ago as I felt (and still feel) like it's rather shocking how someone so ignorant can have any kind of power over something that they clearly know nothing about. Here's what Danish MEP Jens Rohde had to say about the public response to the directive in a Facebook post of his from ~2 months ago:
Always pleasant when the web communists hack and spam my PC in parliament. 50,000 e-mails just yesterday containing largely identical messages - in difference languages though.
This time because I tomorrow vote in favor of artist copyright is valid on the internet as well as everywhere else.
This is not about mass surveillance.
This is not about limiting freedom of speech unless you steal others' content for commercial use.
This is also not about the so-called link tax in article 11. Bloggers can calmly continue working.
This is simply about active commercial platforms which must pay to use people's content for commercial purposes. All passive platforms, marketplaces, wikis, clouds, closed networks are exempt from this proposition that I've helped create and vote for tomorrow.
Creators can themselves ask that their content is monitored, or they can upload it unprotected. That's their choice.
Technology has NOT been considered in the proposal. That will come later.
And let me repeat for the hundredth time: spam as well as hacking is especially counterproductive to me, if you want to promote your cause.
By the way, I will never subscribe to the communist pirate opinion that FREE internet is the same as internet for FREE - no matter how much you attack my PC.
13 votes -
Getting started with qemu
9 votes -
Batch-saving websites for offline viewing
Anybody here have a good setup for batch-downloading articles/news from several sites you specify, similar to youtube-dl but for general websites? I'm sure it could be scripted with not too much...
Anybody here have a good setup for batch-downloading articles/news from several sites you specify, similar to youtube-dl but for general websites? I'm sure it could be scripted with not too much effort but I'm interested what polished solutions there are.
The idea would be so people with rare internet access could go to a hotspot weekly or something and sync that week's worth of content.
12 votes -
Humble Bundle: UI/UX Design
10 votes -
Programming Challenge: Reverse Polish Notation Calculator
It's been nearly a week, so it's time for another programming challenge! This time, let's create a calculator that accepts reverse Polish notation (RPN), also known as postfix notation. For a bit...
It's been nearly a week, so it's time for another programming challenge!
This time, let's create a calculator that accepts reverse Polish notation (RPN), also known as postfix notation.
For a bit of background, RPN is where you take your two operands in an expression and place the operator after them. For example, the expression
3 + 5would be written as3 5 +. A more complicated expression like(5 - 3) x 8would be written as5 3 - 8 x, or8 5 3 - x.All your program has to do is accept a valid RPN string and apply the operations in the correct order to produce the expected result.
18 votes -
Hurricane Florence, worries grow over half dozen nuclear power plants in storm's path
23 votes -
A series of suspicious money transfers followed the Trump Tower meeting
15 votes -
Reddit has banned the QAnon conspiracy subreddit r/GreatAwakening
15 votes -
Eddie Kendricks - Ain't No Smoke Without Fire (K-Melson Edit)
3 votes -
Apple can delete purchased movies from your library without telling you
31 votes -
‘Nobody would tell us anything’: US Solar Observatory mysteriously closed by FBI
9 votes -
US Food and Drug Administration cracks down on Juul and e-cigarette retailers
8 votes -
'I just expected better': Reimagining a Muslim female superhero
10 votes -
Whole Foods workers in the US are moving to unionize
15 votes -
Ben Gibbard LIVE on KEXP - Playing requests from his catalogues (2018)
8 votes -
Reflections on past lessons regarding code quality.
Preface Over the last couple of years, I've had the opportunity to learn from the mistakes of my predecessors and put those lessons into practice. Among those lessons, three have stood out to me...
Preface
Over the last couple of years, I've had the opportunity to learn from the mistakes of my predecessors and put those lessons into practice. Among those lessons, three have stood out to me in particular:
- Consistency is king.
- Try not to be too clever for your own good.
- Good code takes time.
I know that there are a lot of new and aspiring programmers here (and I'm admittedly far from being a guru myself), so I thought it would be good to touch on these three lessons, what they mean, and why they're so important.
Consistency is King
This is something that I had drilled into my head over nearly two years working on the code base at my previous job. Not by my fellow programmers (who did not exist), nor by my boss, but by the code itself.
Consistency can mean a number of things, but there are two primary points that matter:
- Syntactic consistency.
- Architectural consistency.
Syntactic consistency concerns standards in what your code looks like. For example, the choice between
snake_caseorcamelCaseorPascalCasefor naming; function parameter order; or even something as benign as what kind of indentation and how much of it you use.Architectural consistency concerns standards in how you structure your code. Making sure that you either use public class properties or getter and setter methods; using multiple booleans or using bitmasks; using or not using objects for encapsulating data to be passed around; validating data within the primary object or relegating that responsibility to a validator class; and other seemingly minor decisions about how you handle certain behavior make a big difference.
The code base I maintained had no such consistency. You could never remember whether the method you needed to call was named using
snake_caseorcamelCaseand had to perform several searches just to find it. Worse still, some methods defined to handle Ajax calls were prefixed withajaxwhile many weren't. Argument ordering seemed to be determined by a coin flip, and indentation seemed to vary between 2-space, 3-space, 4-space, and even 5-space indentation depending on what mood my predecessor was in at the time. You often could not tell where a function's body began and where it ended. Writing code was an exercise both in problem solving and in deciphering ancient religious texts.Architecturally it was no better. There was no standardization in how data was validated or sanitized, how class members were accessed or modified, how functionality was inherited, whether the functionality was encapsulated in an object method or in a function, or which objects were responsible for which behavior.
That lack of consistency makes introducing or modifying a small feature, a task which should ordinarily be a breeze, an engineering feat of its own. Often you end up implementing that feature, after dancing around the tangled mess of spaghetti, only to find that the functionality that you implemented already existed somewhere else in the code base but was hiding out in a deep, dark corner that you never even knew was there until you had to fix some other broken feature months later and happened to stumble across it.
Consistency means predictability, and predictability means discoverability and, more importantly, easier changes and higher confidence in those changes.
Cleverness is a Fallacy
In any given project, it can be tempting to do something that saves you extra lines of code, or saves on CPU cycles, or just looks awesome and does something nobody would have thought of before. As human beings and especially as craftsmen, we like to leave our mark and take pride in breaking the status quo by taking a novel and interesting approach to a problem. It can make us feel fulfilled in our work, that we've done something unique, a trademark of sorts.
The problem with that is that it directly conflicts with the aforementioned consistency and predictability. What ends up being an engineering wonder to you ends up being an engineering nightmare to someone else. While you're enjoying the houses you build with wall studs arranged in the shape of a spider's web, the home remodelers who come along later aren't even sure if they can change part of the structure without causing the entire wall to collapse, and they're not even sure which walls are load-bearing and which aren't, so they're basically playing Jenga while blindfolded.
The code base I maintained had a few such gems, with what looked like load-bearing walls but were actually made of papier-mâché and were only decorative in nature, and the occasional spider's web wall studs. One spider's web comes to mind in particular. It's been a while since I've worked on that piece of code, so I can't recall what exactly it did, but two query-constructing pieces of logic had overlapping query structure with the difference being the operators and data. Rather than being smart and allowing those two constructs to be different, however, my predecessor decided to be clever and the query construction was abstracted into a separate method so that the same general query structure could be used in other places (note: it never was, and was only ever used in those two instances). It was abstracted so that all original context was lost and no comments existed to explain any of it. On top of that, the method was being called from the most critical piece of the system which, unfortunately, was already a convoluted mess and desperately required a rewrite and thus required me to understand what the hell that method was even doing (incidentally, I fell in love with whiteboards as a result).
When you feel like you're being clever, you should always stop what you're doing and make sure that what you're doing isn't actually a really terrible idea. Cleverness doesn't exist. Knowledge and intelligence do. Write intelligent code, not clever code.
Good Code Takes Time
Bad code more often than not is the result of impatience. We don't like to plan out the solution before we get to writing code. We like to use variables like
xandtempin order to quickly achieve functional correctness of our code because stopping to think about how to name them is just additional overhead getting in the way. We don't like to scrap our bad work if we can salvage it in some way instead, because then we have to start from scratch and that's daunting. We continually work against ourselves and gradually increase our mental overhead because we try to decrease our mental overhead. As a result we find ourselves too exhausted by the end of our initial implementations to concern ourselves with fixing obvious problems. Obviously bad but functional code is preferable because we just want the task to be done and over with.The more you get exposed to bad code and the more you try to avoid pushing that hell onto yourself and your successors, the more you realize that you need to spend less time coding and more time researching and planning. Whereas you may have been spending upwards of 50% of your time coding previously, suddenly you find yourself spending as little as 10% of your time writing any code at all.
Professionals from just about any field can tell you that you can either do something right or you can do it twice. You might recognize this most easily in the age-old piece of woodworking wisdom, "measure twice, cut once". The same is true of code, and doing something right means planning how to do it right in the first place before you've even started on the job.
Putting into Practice
I've been fortunate over the last couple of months to be able to start on a brand new project and architect it in a way that I see fit. Changes which would ordinarily take days or weeks in the old code base now take me half a day at most, and a matter of minutes at best. I remember where to find a piece of code that I need because I'm consistent and predictable about where I place things; I don't struggle to tell where something begins and where it ends because I'm consistent about structure; I don't continually hate myself when I need to make changes to my code because I don't do anything wildly out of the ordinary; and most importantly, I take my time to figure out what it is that I need to do and how I want to do it before I've written a single line of code.
When I needed to add a web portal interface for uploading a media asset to associate with a database object, the initial implementation took me a week, due to the need for planning, adding the interface, and supporting and debugging the asset management. When I needed to extended that interface to allow for uploading the same kinds of assets for a completely different object type, it took me only half an hour, with most of that time being dedicated toward updating a Vue.js component to accept configuration via props rather than working for only the single hard-coded object type. If I need to add a case for any additional object type, it will take me only five minutes.
That initial week of work for the web interface provided me with cost savings that would not have been feasible otherwise, and that initial week of work would have taken as many as three weeks had I not structured the API to be as consistent as it is now. Every initial lag in implementation is offset heavily by the long-term cost savings of writing good code.
Technical Debt
Technical debt is the cost of your code over time. The messier and worse your code gets, the more it costs you to try to change, and those costs only build up. Even good code can accumulate technical debt if the needs for your software have changed and its current architecture isn't compatible with those changes.
No project is without technical debt. Even my own code, that I've been painstakingly working on for the last couple of months, has technical debt. Odds are a programmer far more experienced than I am will come along and want to scrap everything I've done, and will do a far better job rewriting it.
That's okay, though. In fact, a certain amount of technical debt is good. If we try to never write any bad code whatsoever, then we could never possibly get to writing any code at all, because there are far too many unknowns for a new project.
What's important is knowing when to pay down on that technical debt, which could mean anything from paying it up front (i.e. through planning ahead of time) to paying it down when it starts to get too expensive (e.g. refactoring a complicated section of code when changes become sufficiently difficult). That's not something you can learn through a StackOverflow post or a college lecture, and certainly not from some unknown stranger on some relatively unknown website in a long, informal blog-like post.
Final Thoughts
I'm far from being a great programmer. There's a lot that I don't know and I still have quite a bit to learn. I love programming, though, and more than that I enjoy sharing the lessons I've learned with others. Especially the ones that I wish I'd learned back in college.
Please feel free to share your own experiences, learned lessons, and (if you have it) feedback here. I'd love to read up on some other thoughts on this subject!
21 votes -
On The Sidelines Of Democracy: Exploring Why So Many Americans Don't Vote
10 votes -
What is beautiful to you?
What do you find to be beautiful? Is there anything so beautiful it can bring you to tears? Anything so beautiful that just thinking about it brings you to tears? Please share that beauty with the...
What do you find to be beautiful? Is there anything so beautiful it can bring you to tears? Anything so beautiful that just thinking about it brings you to tears?
Please share that beauty with the rest of us!
26 votes -
Collapsed comments?
I'm starting to see occasional collapsed comments when I open threads. The first time I saw one, I thought I'd accidentally collapsed the comment myself, but this one was definitely already...
I'm starting to see occasional collapsed comments when I open threads. The first time I saw one, I thought I'd accidentally collapsed the comment myself, but this one was definitely already collapsed when I opened the thread.
Is this related to the "tagging" system that Deimos discussed the other day? At the time, he said that "tags" wouldn't have any effect. Are these effects now working? What are the effects? Also, there was no actual decision about what the different tags would be, and what they would mean. As I said in that thread, I decided not to use these tags until: a) they were agreed and defined; b) they actually did something. I thought they were just placeholders for now. I'm confused.
Or is there some other feature operating here? For example, people keep talking about "whisper" comments, and I'm not sure if they're just fantasising about a feature they would like, or if it's something that's actually planned. Are these those "whisper" comments?
25 votes -
The Julia Language Challenge
4 votes -
What have you been listening to this week?
What have you been listening to this week? You don't need to do a 6000 word review if you don't want to, but please write something! Feel free to give recs or discuss anything about each others'...
What have you been listening to this week? You don't need to do a 6000 word review if you don't want to, but please write something!
Feel free to give recs or discuss anything about each others' listening habits.
You can make a chart if you use last.fm:
http://www.tapmusic.net/lastfm/
Remember that linking directly to your image will update with your future listening, make sure to reupload to somewhere like imgur if you'd like it to remain what you have at the time of posting.
15 votes -
My Review of 5/3/1's Pervertor Template
3 votes