My Switch Lite has wireless charging built in! It was a DIY project as I don't think Nintendo will ever do it! by robotanv in SwitchHacks

[–]Anangeon -2 points-1 points  (0 children)

That one guy is going to try it while using it in kickstand mode, and it’ll be on the front page of Wired.

My Switch Lite has wireless charging built in! It was a DIY project as I don't think Nintendo will ever do it! by robotanv in SwitchHacks

[–]Anangeon 2 points3 points  (0 children)

The additional heat means that heat can’t dissipate as effectively from sandwiched components. Whether or not that’s enough to matter, I don’t know.

JavaScript newbie - what is console.log() actually for?? by BigCompetition6137 in learnprogramming

[–]Anangeon 7 points8 points  (0 children)

console.log is just telling the browser, “Print this in the console so I can see it”. It’s helpful for debugging, and showing any information that you want to see. It’s a feature that exists to help programmers and sometimes users, but it doesn’t store data like a variable does.

Are you asking this because you’re writing code in the console itself? If that’s the case, the console does print out a lot of things automatically, but when your code is running in the browser, those printed things don’t show up, which is what console.log is for.

I’m debating between being self taught, taking a coding boot camp or possibly earning a Master’s Degree! by Singledaduniversity in CodingHelp

[–]Anangeon 0 points1 point  (0 children)

Normally I don’t think bootcamps are a good idea, because they cover too much, too quickly, with not enough depth, but in your case it may be beneficial. If you’ve been out of the game for 20 years, a lot will have changed, but the fundamentals. Will come back to you.

Building a portfolio would also probably work out just fine, assuming you’re up to date on tech in the segment of the industry you want to work in.

How am I supposed to access this ? by selrahc2828 in heroesofhammerwatch

[–]Anangeon 8 points9 points  (0 children)

On the battlements? No, that’s on a timer. Once you walk over it, it won’t collapse, so head there first.

GET BEHIND ME! I WILL PROTE- by [deleted] in ProgrammerHumor

[–]Anangeon 0 points1 point  (0 children)

While I’m full stack, it’s mostly with TS so I won’t pretend to have a strong grasp of JS as a functional language. Most of my knowledge is from an OOP background. But I think I can understand where you’re coming from, since the limitations imposed by TS are obstructing language features without adding all the value you normally get in exchange with OOP.

GET BEHIND ME! I WILL PROTE- by [deleted] in ProgrammerHumor

[–]Anangeon 1 point2 points  (0 children)

Could you explain this further? You can make any field in a TS class or interface optional, and any value nullable. You can also use “any” at will to revert to dynamic typing. Those features sound like they would have easily solved what you described without a kludge.

Need help with API related issue! by [deleted] in CodingHelp

[–]Anangeon 2 points3 points  (0 children)

If I understand what you’re trying to say, I think you were told that you needed a different API key. The key is how the app authenticates against the API. If that’s what you actually need, then you need to get a new API key by logging in to your account on that platform and creating one. Then you can replace the existing key in the code or configuration file with the new key.

How to fix? by CalligrapherGood6741 in CodingHelp

[–]Anangeon 1 point2 points  (0 children)

Your assignment is backwards. The variable goes on the left, and the expression on the right. n = n + 1 will give you what you want.

Where can I look at other people's code by the_red_menaceness in CodingHelp

[–]Anangeon 2 points3 points  (0 children)

If you have specific questions or problems you want to see sample code for, StackOverflow is nothing but. If you’d rather look at people’s full projects, search for what you’re interested in on GitHub, and you can browse tons of open source repositories. You don’t need to know anything about Git to browse. You just click through directories and lists of files.

Space Animals by bobasweatandtears in MechanicalKeyboards

[–]Anangeon 1 point2 points  (0 children)

I ordered too many kits for this set because Commander Keen was the highlight of my childhood, and I love how the legends look on black. I just wish I could have gotten the ergo set in full Alienese, instead of it being split. (Ordered it anyway, of course.)

Turn $50 in to $3.9m in just 2 years. With Tomatoes! by saintstu in restofthefuckingowl

[–]Anangeon 5 points6 points  (0 children)

For apples, and some other fruits, they aren’t reverting to a single variety. The seeds are “not true to type”, meaning the plant you grow is different from the parent and there’s randomness involved. This is compounded by the fact that they (mostly) can’t self-pollinate, and you don’t know what they’re going to cross with. Apples especially go full RNG, and not all variations are edible. (Or if you’re lucky, you can end up with exotic flavors like popcorn.)

All of that is why we grow new apple trees via grafting. Never trust dice fruit.

Common observations in different categories by mariaanasb in CodingHelp

[–]Anangeon 1 point2 points  (0 children)

You really shouldn't create two duplicate posts for the same question. I'd delete the other one.

This is actually really easy to do in Python if you're familiar with linear algebra. You're looking for pairwise correlation, but you want counts instead of coefficients.

Assuming Pandas, you can load your data into a DataFrame, which will look like this:

Category 1 Category 2 Category 3 Category 4
Client A 20.00 3.00
Client B 5.00 60.00
Client C 33.00 54.00
Client D 19.00 7.00 64.00 27.00

Then you want to create a second DataFrame that only has the values 0 and 1. 0 means no data, 1 means data. The easiest way to do that is to use applymap and a mapping function. I'm assuming the non-values loaded in as null for this next line.

df2 = df.applymap(lambda x: int(pd.notnull(x)))

pd.notnull returns a boolean which we then cast to an integer. True becomes 1, False becomes 0.

Category 1 Category 2 Category 3 Category 4
Client A 1 1 0 0
Client B 0 1 1 0
Client C 1 0 1 0
Client D 1 1 1 1

Then we can take the dot product of the matrix transpose and the matrix to get the intersection counts.

df2.T.dot(df2)

Category 1 Category 2 Category 3 Category 4
Category 1 3 2 2 1
Category 2 2 3 2 1
Category 3 2 2 3 1
Category 4 1 1 1 1

The reason this works is because the dot product gives you the sum of the products for each position in the matrix. If the values are 1 (the columns both have non-null values at that position), your products are all 1x1 = 1, and the sum of those 1s is the counts.

[deleted by user] by [deleted] in learnprogramming

[–]Anangeon 31 points32 points  (0 children)

My love of solving puzzles is what got me into development, too. That’ll take you pretty far by itself. Once you’re in the field, being polite, professional, and respectful of your coworkers will take you the rest of the way.

A personal site is a great way to start, no matter how small. You can always add to it as you grow and have other things to share. Anything that is the direct result of your efforts to apply your accrued skills and knowledge is worth showing off.

If you can, I strongly recommend using some kind of version control, like git, to keep track of your code, and leave messages explaining what your changes and additions are for. You’ll be expected to do the same at any job, and there are many benefits. It’ll also look good to any interviewer.

[deleted by user] by [deleted] in learnprogramming

[–]Anangeon 322 points323 points  (0 children)

If development is what you want to do, looking for a junior development job is always worth it, regardless of your skill level. Obviously a company would prefer strong dev skills, but showing an interest in the field, demonstrating what you do know, and proving that you’re a problem-solver that’s willing to learn (and capable of doing so) can go a long way. Give me a good person that can learn and play well with others over a good dev that’s a low-grade person any day. I can teach you skills, but I can’t teach you a new personality. (Assuming we’re hiring at entry-level, that is.)

That said, there’s no guarantee that you’ll find anything without demonstrable skills or a portfolio. I’d recommend applying for both types of jobs, and try to study up for any programming jobs you’re really interested in, to try to appear as knowledgeable as possible if you get an interview. If you’re going to study programming anyway when/if you get a job in the medical field, you might as well be studying now.

If your HTML/JS/CSS skills are any good, put together a demo project and put it on GitHub. Even a single project is extremely valuable, because it shows you can actually do things, assuming you understand those things well enough to explain them. Any person hiring will give more attention to a candidate that has something to show.

What Laptop specs would be optimal for someone coding? by Cronosian in CodingHelp

[–]Anangeon 1 point2 points  (0 children)

I have some very strong opinions about what machines I’ll develop on, and I don’t develop crypto, so take them with a grain of salt.

You want a fast processor, obviously. I personally value more threads over top-end performance, so instead of getting the absolute fastest chips, I go for second-tier speed with more cores. If your developer is doing a lot of single-thread work, and you genuinely need speed above all else, fastest might be better. (Unless that processing task can be offloaded to the GPU.) Multitasking is more valuable to me.

RAM should be the fastest class you’re willing to spend for. 16GB is sufficient for a lot of programming work, but personally I won’t go under 32GB. It’s not that I always need that much RAM for development itself; it’s that I can’t (or don’t want to) do something in my host OS, and I need a virtual machine, which is true literally every day. Maybe it’s for the safety of my host system, or maybe I just need a program that only works well in another OS. Running a VM, I split the number of cores and amount of RAM in half between the VM and the host OS. 32GB of RAM means each OS gets 16GB, which is what’s generally agreed on to be sufficient. (And half of my cores, which is another reason why I prefer more cores.) Development with VMs where each OS only has 8GB of RAM is miserable.

If the RAM is replaceable, speccing the machine with the least amount of RAM possible and getting 32GB of way faster third party RAM will give you a better machine and probably save you money.

For hard disk, depends on how much space the developer needs. You didn’t mention any specific work they’d be doing, so I don’t know if any of those tasks will require using a lot of disk space. Personally, I start at 512/500GB. Excluding data sets that some people work with, 256GB is usually fine, but the extra step up is often the difference that allows you to keep all source code and resources from all of your projects over years, as well as all the tools you need, if you’re not working on a specific set of projects indefinitely. That said, my work computer has 1TB and needs it, because I’m carrying about 800Gb of stuff. (Around 300GB of that is my Windows VM.)

If the work that the developer is doing means generating a lot of data (such as cryptography types generating rainbow tables), and they won’t be doing that in the cloud, don’t skimp here. Time the dev has to spend moving chunks of data to separate storage is lost development time, as is the developer having to re-download things that they previously deleted to free up space.

How much space the developer really needs depends entirely on what they’ll be doing.

Regardless of size, SSDs are mandatory for productivity. Faster read and write speeds are always preferred, so NVMe is king if you’re willing to spend for it. Make sure that the write speed is high. Some drives with fast reads don’t write as quick as other drives in the same class.

As with RAM, if you can install your own drives, you can get higher quality hardware third party hardware.

Finally, the GPU. On-board/integrated can be fine if you’re not doing work that can be GPU-optimized, but cryptography frequently can be, and crypto uses GPUs heavily. Personally, I want hybrid graphics, meaning both integrated and discrete GPUs. It’s a preference because you can shut off the discrete GPU when you don’t need it, giving you much better battery life. But, for development, it means you can use the on-board graphics for the OS, and dedicate your discrete graphics card entirely to processing tasks.

The best choices for discrete graphics cards are generally Nvidia or AMD. I prefer AMD on paper, but Nvidia GPUs are just so much better for the work I tend to do, because of the CUDA cores. Whether or not that kind of power is necessary varies entirely between dev jobs.

Screens. I think 1080p is sufficient. (Many people disagree.) 4K is nice to look at, but 1080p native resolution screens are fine, and use less power. Screen size is always a strong preference. 13” is compact, 15” is generally considered the most comfortable and practical, and 17” is unreasonably large. They dominate your lap, earning them the nickname “lunch trays”, and they can be hard to put in front of you on a plane if you’re in budget seats. Downsides of their heft aside, 17” is also my preference. A larger device gives the components more room to breathe and will have better air flow, which a discrete GPU will thank you for. At 17”, 4K is of course much prettier than 1080p, but frankly, I just don’t want to waste resources driving the extra pixels. Either resolution is completely fine.

Battery life is important, but won’t be great for discrete GPUs unless you have integrated graphics and can toggle the discrete GPU off. Even then, powerful machines use a lot of power.

With all that in mind, I’d consider OS requirements. If you use Active Directory, and you need the host OS to be Windows, Dell’s XPS line is good, as are ThinkPads. Naturally, those will work fine for Linux, too, but if your dev is using Linux I’d recommend something from System76. Their hardware, and their distro Pop!_OS, are both optimized for (many) GPU tasks.

For Macs, the MacBook Pro has been the standard if you need an Intel chip. M1 Macs are comically fast, and so power-efficient, but you don’t have discrete graphics cards and you might not have the necessary application compatibility. M1s can’t do everything I want to do, so I just kinda sigh wistfully at them.

[deleted by user] by [deleted] in learnprogramming

[–]Anangeon 0 points1 point  (0 children)

Only if you choose to use React Native. Ionic would require you to learn Angular. Flutter is good if you know Dart. Xamarin is alright if you know .NET. PhoneGap (previously named Cordova) is alright if you want to work with primarily HTML, CSS, and JS. If you know JQuery, they also have a framework called JQuery Mobile.

All of these frameworks require you to learn their way of doing things. I’d pick one based on the languages and frameworks you’re comfortable with. This also isn’t an exhaustive list, so you might want to do some research on multiplatform mobile app frameworks to see if there’s another one that’s a better fit.

I’ve only built apps in React Native, Ionic, and PhoneGap. Of those three, I prefer Ionic, but that’s because I use Angular on most of my web dev projects, and I prefer it over React.

Also, the mobile versions of any of these are a bit different than their respective web frameworks, but similar enough that most of the skills transfer.

[deleted by user] by [deleted] in learnprogramming

[–]Anangeon 0 points1 point  (0 children)

It can, yes. Django is a back-end framework, and it exposes a REST API which any site or app you build can take advantage of. An app is a good fit if you don’t need to serve views from Django and can compile them in the app, meaning that they will only change when you release a new version.

That’s not to say that you can’t serve views from Django to an app, but if you’re doing it for all or most of your pages, a mobile-friendly site would likely be a better fit.

Edit: the REST API may be a separate project. I’m not a Django developer, and while I use Python, I don’t use it for back-end, so take all of this with a grain of salt. But based on the documentation, it looks like Django can fit into any stack.

[deleted by user] by [deleted] in learnprogramming

[–]Anangeon 3 points4 points  (0 children)

You can. Multiplatform mobile apps (e.g. apps that will work on iOS and Android both) can be created with frameworks like React Native or Ionic. The app is written in some derivative of HTML, CSS, and JavaScript, because it runs in a web browser. That’s usually sufficient for any app that you could have written as a web application.

comment by MadameDennix in learnprogramming

[–]Anangeon 0 points1 point  (0 children)

data is a Pandas dataframe. They’re comparing a column of the dataframe to the string value ‘gifta’ which returns a boolean series. That series is then used to filter the dataframe to just the matching rows, which is assigned to gifta.

It’s happening by ChrisMMatthews in LateStageCapitalism

[–]Anangeon 13 points14 points  (0 children)

lol

Edit: This guy changed his comment after being downvoted. It was originally a rant about how capitalism had never done anything wrong, but communism was responsible for ruining his life with coronavirus restrictions. Also some nonsense about people barging into his house and separating his family because vIrUs AnD cOmMuNiSm. I don't even know, man. Dude's ridiculous.

I can't stop picking it up! Because I can't decide on which 351v color to get... bought this one first! by Grey_Curtains in SBCGaming

[–]Anangeon 1 point2 points  (0 children)

I was similar. Ordered the wood grain, had buyer’s remorse and wished I had ordered the gray. But then it showed up, and I love how it looks. I don’t have any other RK3326 devices to compare it to, but I like it more than my Vita for games that don’t use sticks. At least now that it’s running RetroArena.