• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics with the tag "talk". Back to normal view
    1. Feature(?) request: Free talk thread

      The ? means, it doesn’t really need to be coded. Technically I could just do it. But i wanted to check in first. I really like the community here, amd sometimes want to share or ask something...

      The ? means, it doesn’t really need to be coded. Technically I could just do it. But i wanted to check in first.

      I really like the community here, amd sometimes want to share or ask something really small. I can and have started a whole thread for it, but we might be better served by a short comment in a larger thread.

      What do yall think?

      13 votes
    2. My hot take on internet "Privacy"

      Internet privacy it is a farce and companies are using the fear for profit. In reality the only thing you can do is decide in which company do you trust. First thing you choose is the ISP, we all...

      Internet privacy it is a farce and companies are using the fear for profit. In reality the only thing you can do is decide in which company do you trust.
      First thing you choose is the ISP, we all know that they are all scummy and get caught every year selling information, throttling services, lying, etc.
      Then, if you want to be safe from your ISP you have to get a VPN and it is the same old story again. Even if you manage to never send or receive a bit outside the VPN you have to trust they are not loging everything and selling it.
      It is a never ending story, because after that you have to trust the OS, the hardware manufacturers of each piece of your phone/pc, the modem, the router, the apps, and if you are talking with someone make it double because you have to trust all the same things from the one receiving the message.
      People talks about huawei spying for the CPP like if things like PRISM doesn't exist. Every country has some kind of mass surveillance program and there is nothing we can do about it. If I were american I would prefer being spy by the Chinese that can't get me extradited.

      13 votes
    3. An informal look at the concept of reduction (alternatively: problem-solving for beginners).

      Preface One of the most common questions I see from prospective programmers and computer scientists is "where should I start?". My answer to that is a pretty consistent one: learn how to solve...

      Preface

      One of the most common questions I see from prospective programmers and computer scientists is "where should I start?". My answer to that is a pretty consistent one: learn how to solve problems effectively. But that's vague and not really all that helpful, so I figured that I should actually tackle this in a little more depth by touching on something more specific.

      Specifically, I want to touch on the subject of how to think about complex problems.


      The Rationale Behind Learning

      Before we can better understand how to effectively solve problems, it's important to consider how it is that we learn. With any subject, the standard approach is to begin with the bare basics. For programming, that's writing a Hello, World! program in the new language you're working with. For foreign languages, you learn basic common words and sentence structure. For math, you learn your basic arithmetic operations like addition and multiplication.

      From there, we add on more additional complexity and string together everything we've learned. For a foreign language, this looks like learning about new words, stringing them together in your own sentences, then learning about verb tenses and throwing them into the mix as well. With math, you take your normal number crunching and suddenly throw the concept of order of operations into the mix, then variables and how to solve for them.

      As a general rule, we first get comfortable with solving a simple problem and gradually build up toward solving increasingly more difficult ones.


      The Missing Piece

      Odds are that we've all sat in a math class at one point, and when the teacher asked a student how to solve a problem, they received an immediate "I don't know". You may or may not have been that kid yourself. I have no intention of shaming the kids who struggled (or those who still struggle) with math. Rather, I want to point to what I believe is the fundamental cause of that mental barrier that has frustrated students for generations.

      Learning is not simply a matter of adding more complexity to problems. A key part of learning, and one that I don't recall ever having emphasized during my grade school studies, is your ability to break problems down into the steps that you know how to complete and combine the different, simpler skills you've already learned to arrive at a solution. Instead, you were expected to solve many of those complex problems and learn through practice, or through pure rote memorization.

      What determined whether or not you could solve those problems was then a question of whether or not you could intuit or memorize how to solve those specific problems, and brand new problems that still made use of the same skill sets but had completely different forms would throw a wrench in that. Those who could solve any of those problems--those who, I would argue, were often mistakenly referred to as "geniuses" or "talented"--were really just those who knew how to break a problem down into simpler pieces.

      This isn't a failing on the students, but on the way they've been taught to think about problems.


      Reducing Problems

      What does it mean to "break down" a problem, though? The few times I recall a teacher ever touching on the subject, "break down the problem" and "use the skills you've already learned" were the kinds of pieces of advice passed around, completely vague and devoid of meaning for anyone who didn't already understand. How can we better grasp this important step?

      There's a term in complexity theory known as "reduction". The general idea is that if you have problems A and B, where you already know how to solve B, then if you can transform problem A so that it looks like problem B, then you can use your solution for B to solve at least part of A.

      In other words, finding the solution to a more complex problem is just a matter of finding a way to make it look like a problem you already know how to solve.

      The advice to "break down" a problem really means to perform this process of "reduction", of transforming your more complicated problem A into your simpler, known problem B.


      In Practice

      We're still discussing a vague concept, but now that we have more specific language to work with, we can more easily see how it works in practice (a reduction of its own!).

      Let's consider a conceptually simple problem: grabbing the kth largest (or smallest) item from a list. How do we solve this problem? Probably the most obvious and straightforward answer is to sort the list then grab the kth item, right?

      Notice that we gave two high-level descriptions of the steps we need to solve this problem: sorting, then grabbing the appropriate item. We can therefore then state that the problem of "grab the kth largest/smallest item from a list" can be reduced to the two problems "sort a list" and "grab the kth item from a list".

      Now, let's say we're given the problem "take this list of competitor times from the race and tell me what the top 10 race times were". What do we know about this problem? We know that we're being given a list, and we know that we need the 10 smallest items from that list. We also know that "10 smallest items" is just shorthand for "the 1st smallest item, the 2nd smallest item, ..., and the 10th smallest item". We can therefore reduce this problem to the previous one we solved by transforming it into "grab the kth smallest item from a list" and "repeat for values 1-10 for k".


      Practical Advice

      In the end, my explanation may not have helped much at all in actually grasping the concept of reduction. My intent isn't necessarily to help you understand it immediately, but to provide you a framework for a way of thinking. Even if you do grasp the general concept, you may even wonder how you're supposed to recognize these kinds of reductions out in the wild in non-academic environments. The answer, perhaps annoying, is practice. Much like an appraiser can only become good at discerning details through experience, a programmer or computer scientist can only recognize these patterns through repeated exposure.

      In general, if I had to narrow it down to a small list of tips for improving your problem solving skills, this would be it:

      • Work on grasping the concept of reduction itself.
      • Expose yourself to lots of new problems.
      • Don't shy away from difficult problems. Reduce them as much as you can and solve the pieces you're able to. Try to research the pieces you're struggling with. Return to the problem later when you have more experience if you have to, but take a crack at it first.
      • Don't accept "I don't know" as an answer in itself. Ask yourself why you don't how to solve a problem. Narrow down which pieces you're able to solve and which pieces you're not.
      • Just solve problems. Any problems. Easy ones, hard ones, and anything in between. Solving problems is a skill, and practicing it will make you better at solving problems in general, and better at recognizing the simpler problems inside of more complicated ones.
      • Don't just come up with a solution to a problem. Ensure that you understand how each piece of it works and why it works. Copy-pasting from StackOverflow can be a valid tool at your disposal, but doing so mindlessly isn't nearly as valuable as reviewing the solution, being able to determine whether or not it works before ever executing the code, and being able to discard anything unnecessary from it.

      Final Thoughts

      I'm not an authoritative voice on this subject. I'm not an educator. More than anything, I'm a life-long student and an enthusiast. There's seldom a day when I don't have to research something new in order to solve a problem I'm not familiar with, or remind myself the syntax for a function I've used several times in the past. I don't know anything about teaching others, but I do know plenty about learning, and if there's anything that has stood out to me over the years, it's the fact that I find it easier to learn about something or to solve a problem if I can transform the concept into something that's easier for me to grasp.

      Moreover, I'm human and thus prone to mistakes. Call me out on them if you notice them. I'll take any of my mistakes as learning opportunities :)

      11 votes
    4. 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:

      1. Consistency is king.
      2. Try not to be too clever for your own good.
      3. 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:

      1. Syntactic consistency.
      2. Architectural consistency.

      Syntactic consistency concerns standards in what your code looks like. For example, the choice between snake_case or camelCase or PascalCase for 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_case or camelCase and had to perform several searches just to find it. Worse still, some methods defined to handle Ajax calls were prefixed with ajax while 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 x and temp in 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
    5. On an internet run by personal information, what do you do to manage yours?

      Almost every content provider online tries to access some of your personal info, whether it's to keep itself afloat, improve functionality, or create profits. In 2014, Google made [89.4%]...

      Almost every content provider online tries to access some of your personal info, whether it's to keep itself afloat, improve functionality, or create profits. In 2014, Google made [89.4%] (https://revenuesandprofits.com/how-google-makes-money/) of its profits from advertising, all of which attempts to target users with their interests (though Google does allow this to be disabled).

      What do you do to try and protect yourself from data collection? What software, programs, or browser extensions do you trust to protect you, and not just also monitor your activities?

      If you don't do any of this, why not? To what extent do you think companies should be allowed to use your data?

      30 votes
    6. The best thing Discord could do to grow is not focus on games as much.

      This thread talks about Discord is trying to become Steam just as Steam is trying to become Discord. Deimos and others said This feels like the beginning of Discord flailing around in search of a...

      This thread talks about Discord is trying to become Steam just as Steam is trying to become Discord.

      Deimos and others said

      This feels like the beginning of Discord flailing around in search of a business model.

      But I really like this comment from Krael,

      It's a Slack/Ventrilo hybrid that requires almost zero technical knowledge to set up or join. It's nothing groundbreaking by ANY stretch of the imagination, but there's a reason it took off the way it did.

      Discord is at its heart is the same as Skype/Slack/Teamspeak/IRC but the UI/UX is leagues above everything else. Using Discord is so much easier than most alternatives and with just enough integrations that if they coughed off the "gaming" mantra they would be able to attract so many more users. Perhaps enough to get the amount of Nitro subs to stay afloat.

      14 votes
    7. D&D Tales: The Croco-rocket

      So, I've been playing this campaign with some friends for a while where I am a crocodile-themed lizardfolk hick with a thunder cannon named Cletus Cornelius Crocodilius the 3rd. Much fun has been...

      So, I've been playing this campaign with some friends for a while where I am a crocodile-themed lizardfolk hick with a thunder cannon named Cletus Cornelius Crocodilius the 3rd. Much fun has been had so far, but today something extra special fun happened.

      So a while back our party found a stone that basically makes whatever it's being wielded by as light as a feather. So naturally our undead pirate monk has been using it to fuck with Cletus by shoving it into his mouth and then pushing him great distances. I thought it was funny, the DM thought it was funny, and it'd give us all a great laugh. But, it did give me an idea.

      See, we were all hunting down this nasty chimera, and after some scouting we knew it could fly. That was no bueno for us and we needed something to clip its wings. Suddenly, I remember that we have a stone that made me weigh about as much as a toddler. I also had several bear traps. And since I was a crocodile, I could grapple things with my mouth, leaving my hands, and my thunder cannon, free to attack.

      So, we lure the flying chimera out with out bird-person bard, who lures it into range. We take all our ropes and strap the bear traps to Cletus and then an anchor line around his waist. We then have the sorcerer gnome cast enlarge upon himself, making him the massive size of a slightly larger than average human. He and the monk then chuck me as hard as they can at the chimera, which I proceed to stick to like a giant reptilian tick. I then spat the stone out onto the ground, and suddenly this tick weighed 800lb again.

      I proceed to spend the entire combat session locked to this thing, blowing chunks off of it with my thunder cannon until it is grounded and no longer able to fly. It was still a tough fight, but we managed to prevail in the end.

      It then became a desperate struggle to cut Cletus out of the bear traps before the dead Chimera fell off the bridge we were fighting it on. Thanks to a few lucky dex saves from myself and the bird person, Cletus managed to leap off the plummeting chimera at the last second.

      I love this game.

      10 votes
    8. Tildes E3 Bingo?

      So, it seems bingo cards of hype or disappointment have become all the rage nowadays, and with E3 coming up in a few days I was wondering is Tildes wanted to make their own hype/disappointment...

      So, it seems bingo cards of hype or disappointment have become all the rage nowadays, and with E3 coming up in a few days I was wondering is Tildes wanted to make their own hype/disappointment bingo card. Feel free to chime in with suggestions.

      Here's a few:

      "Microsoft does something actually cool." - wishful thinking, but I love my xbox and just want to see it flourish.

      "Video Game movie announcement that doesn't look like shit" - how hard can this be?

      "Sony gets exclusive content" - this is just me being bitter about the exclusive dlc in PS4 Destiny.

      "God of War sequel" - I know it's guaranteed to happen at some point, but it would be hype if they dropped some sort of teaser or something even though it's incredibly early.

      "0 charisma presenters" - why can't these studios just hire someone to hype them up?

      "Awful fucking 'gamer' dialogue" - you know what I'm talking about. Just look up E3 last year with Anthem.

      "Over-focusing on a lack of microtransactions" - this point is gonna be over sold so hard because of Battlefront.

      12 votes
    9. My problem with the site at the moment

      For the last couple of days I've been visiting the site several times a day and leaving after 10 minutes or so. It's not that the site is bad or the discussion isn't good, but there's been a big...

      For the last couple of days I've been visiting the site several times a day and leaving after 10 minutes or so.

      It's not that the site is bad or the discussion isn't good, but there's been a big lack of discussion I'm interested in. I don't like to take place in discussion of politics, or religion, or LGBT, or whatever. For me, the forums always were a place to meet new people to talk to, without it being a date or making friends or anything, just a friendly talk. Not that there shouldn't be a place for talking about world problems, but I get much more enjoyment from small issues or just getting to know other people.

      Which is why I haven't been very active here for the last couple of days. There is all this LGBT talk and Trump and catastrophes. Even in the ~talk, there are 'Homosexual marriage legal or illegal?', 'Do you think school uniforms should be in all American/Canadian schools?', 'It's a Piece of Cake to Bake a Pretty Cake: LGBT+ Discrimination'. There is a fair share of smaller conversations, but they are mostly things I'm not interested in: 'What's your favorite documentary?, 'Advice- Best Tablets for Interactive Training' ― or things I don't know enough about to discuss, like 'How to gauge the degree of someone's self-awareness?'. This leaves very few posts I'm interested in, and I can hardly engage there because everything I could've said has already been said before I saw it.

      Everything above is why I was mostly active in my own posts when I first joined as well. And I wanted to create this post to express this frustration(?) with lack of content, and I'm sure a lot of other lurkers will agree with me on that (whether or not they have different interests) ― I'm writing this post for them, too. I have no idea how you'd fix this problem or if it's even fixable, but I think it's important to state it so more active people can notice and so I have someplace to be active on ~.

      24 votes
    10. What’s Pride month like for you?

      Coincidentally checked right after this went up, hi gay friends! As someone living in the South, Pride is actually a fall/spring thing, so I don’t have much to look forward to offline with Pride...

      Coincidentally checked right after this went up, hi gay friends!
      As someone living in the South, Pride is actually a fall/spring thing, so I don’t have much to look forward to offline with Pride this month.
      What stories and events do y’all have?

      12 votes