• Breaking News

    Thursday, January 21, 2021

    Programmers who've worked on low level hardware and OS code - how is the code quality? Ask Programming

    Programmers who've worked on low level hardware and OS code - how is the code quality? Ask Programming


    Programmers who've worked on low level hardware and OS code - how is the code quality?

    Posted: 21 Jan 2021 12:25 PM PST

    Having worked in dev for about 7 years now, I've come to see some of the worst code imaginable and some of.. well, just some decent code. I've never been particularly blown away by anything, be it because it was pretty, or well organized, or efficient. I suppose some of the bigger libraries are pretty well done, but anything that has been in-house and some 3rd party libraries is usually pretty average or down right horrifying.

    So anyone who has worked on the really low level stuff, like DSPs, PCIE controllers, network controllers, and kernel stuff - what is your overall opinion on the quality of code? Do programmers at this lower level, who know that any clunky code could have severe consequences as application layers are continually stacked on top of it, put more effort in to it? Or is a programmer in this area the same as a programmer you would find in the application, database, maybe even UI layers, where performance can more often be ignored until someone complains.

    Cheers.

    submitted by /u/ohweoew
    [link] [comments]

    Suitability of TDD for non-trivial greenfield development?

    Posted: 21 Jan 2021 03:31 PM PST

    I'm curious what you guys have to say about TDD for greenfield development. On paper, I'm a fan of what TDD has to say. I've actually never done it properly, and I think it's because the things I tend to work on, tend (in my view) not to work well with TDD.

    Here are my thoughts: Back in the day the SDLC was very engineering-esque, like building a bridge. You define scope, gather requirements, do a lot of design and documentation, and then in the end you finally put finger to keyboard and write the actual program according to the specifications layed out in the earlier steps. But the whole concept of Agile Programming came about because we're not building a bridge - we're writing a computer program, probably for some client or some users, and we know things change (often!). The scope/requirements can change, the hardware/software environment can change, etc. And the longer the development time is, the more likely it is that things will change.

    So here's my problem with TDD for any non-trivial greenfield development: Today, we understand the requirements and the scope, and we can write the clean code to execute those tasks. But as things inevitably change, we will have to change, delete, or rewrite parts of our code. Some parts of our code might be modified or deleted many times. Some times, when we're doing something a little more foreign and unusual, we may not know the exact way to accomplish what we want. Maybe we're using some obscure, poorly documented set of stored procedures for a DB and we're not quite sure what the output will look like in all cases, so we need to give it a go and massage it later and flesh it out. It's okay, we'll get there. But in these scenarios, TDD does not seem so useful. In the case of the deleted/changed/rewritten code, the tests we wrote (first) will be nothing but wasted time. In the case of the "not exactly sure how this will work" bits, we don't know how to write the tests (first) because we don't really know what the code will eventually look like.

    I'm not saying full TDD is not possible with non-trivial greenfield development; but I think a lot of the written testing code will end up being tossed, and it will represent a HUGE burden in dev time.

    There is only one thing I see as really genuinely useful in TDD for non-trivial greenfield development: if you follow full TDD the whole way, you will not have that boring and agonising phase at the end where you have to sit there and write tests for all your code.

    Many in my team agree that TDD sounds great, but our team in the company seems to do a LOT of R&D and (highly) non-trivial greenfield development, and we haven't really had the chance to give it a try. But we've decided the next new project we start, we're going to give it a go and see what happens.

    I'm curious to hear you guys' thoughts on this.

    submitted by /u/Ozzah
    [link] [comments]

    What is a good way to sort products by their average rating while keeping into account how many ratings they have?

    Posted: 21 Jan 2021 05:31 PM PST

    Sorry if this is commonly asked; I used the search, but it often fails me.

    I have products in a database that have an average rating and how many times they've been rated. I want to create a top rated list, but I need to keep into account how many ratings each product has.

    As an example, a product rated 4.6 with 32 reviews should not be lower than a product rated 5 with 1 review.

    I saw the discussion here 8 (!) years ago, but many of the comments disliked the solution the article came up with.

    Any suggestions on this topic would be super helpful. Thanks!

    submitted by /u/Asusralis
    [link] [comments]

    How can documentation be improved?

    Posted: 21 Jan 2021 08:44 PM PST

    Where would a novice start to learn machine code for use of emulating consoles.

    Posted: 21 Jan 2021 05:30 AM PST

    Sorry this is specific as hell

    Thank you for any help in advance Kurtis

    submitted by /u/kurti256
    [link] [comments]

    What do you think is the most represented political ideology In tech?

    Posted: 21 Jan 2021 07:43 PM PST

    I know this is less programming and more of a programming culture question. What do you think is the most represented political ideology in tech and do you think it changes between fields?

    submitted by /u/Cdubles1024
    [link] [comments]

    Getting into low-level programming

    Posted: 21 Jan 2021 06:45 PM PST

    I have found I have an interest in low-level programming. I've taken a small course in operating system theory and a course in interpreters at my university. I feel pretty comfortable with C, so I've got that language under my belt. What do you recommend for low-level programming practice and what career options would you recommend?

    submitted by /u/nanoman1
    [link] [comments]

    A question if Bitcoin wallet mining, would this be possible?

    Posted: 21 Jan 2021 04:13 PM PST

    I recently had a friend who made a Bitcoin transfer to the wrong address and lost her money.

    The way blockchain works, as far as I'm aware, as long as there are a mix of 26 to 35 alphanumeric characters, the BTC amount is then registered to that wallet address regardless of whether it is currently being accessed, this got me thinking. Even though the address she entered may not have been assigned to a particular wallet yet, the money will still be out there, assigned to that specific wallet address meaning that there is a non-zero chance that one day someone will open up a wallet and have access to that money.

    If this presumption is true, and given that there are apparently 1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976 possible alphanumeric combinations of BTC addresses, would it be possible to create a program whose sole purpose would be to automatically open a BTC wallet, see if there is any BTC available and then transfer it to a specific Bitcoin wallet? How quickly could a computer open, scan, transfer and close a wallet then repeat the process. This would essentially be a new way to 'mine' lost bitcoin that had been sent into the aether.

    Furthermore, would it be possible to crowd source the necessary computing power to open more and more wallets and get a % of any bitcoin found this way depending on the ratio of resources committed?

    I am guessing that the blockchain itself would keep track of wallets that have already been opened to ensure that no 2 people ever have access to the same wallet.

    This may be completely off base but I would love to hear an explanation as to how this could/could not happen.

    submitted by /u/KinkKustom
    [link] [comments]

    What Program/App/System do you use to plan your projects, and why?

    Posted: 21 Jan 2021 09:29 PM PST

    Always been the 'just jump in and start' kind of coder, and it's come back to bite me more than once.
    Leading up to a fairly big project I want to plan it out really damn well.

    Any suggestions?

    submitted by /u/BegrudgingCurmudgeon
    [link] [comments]

    How to create a link generator that accepts first two to click the generated link

    Posted: 21 Jan 2021 05:16 PM PST

    So i want to build a private web chatting app, which generates a link when a user signs in, and allows only the first two to click the link, to join the chat lobby. I tried searching how to approach it or generate a link but couldn't find anything, mostly because idk how to approach it so idk what to search because as you probably already figured out i'm not that experienced. So to the experienced programmers out here, do you have any advice/suggestions on how i should do it or what should i learn to build this web app?

    submitted by /u/OsamaNA_dev
    [link] [comments]

    Which online, full-stack coding bootcamp would you recommend for a beginner?

    Posted: 21 Jan 2021 07:56 PM PST

    Purpose of me wanting to learn how to code:

    1) I enjoy learning and am seeking a new challenge. I obtained my Masters in SYSE last fall, so I'm looking for my next challenge. I've been interested in coding for awhile and have spent some time learning basic functions of HTLM, Python, CSS, and a few other on some free online course. But the 'free' ones dont off the intensity or resources needed to learn at an in-depth level.

    2) I don't intend on becoming an expert coder (but you never know). Instead, I want to have a solid understanding language(s) for my next career move (looking at transitioning out of the military in a year or two).

    Based on my research on what the different languages are used for, I'm interested in python the most.

    submitted by /u/tytexas1
    [link] [comments]

    Is creating a bot like this possible?

    Posted: 21 Jan 2021 07:36 PM PST

    So I'm a coding novice. I've taken some introductory courses in C and C++. I wanted to know if building a bot that does this is possible. What I want it to do is 1. extract data from basketball-reference.com to google sheets. 2. Interact with the cels in a certain way to produce a desired number. For example if cel A1 has points per game and cel A2 has points allowed per game I want to do A1 - A2= A3. A3 would have the desired number. Is creating a bot that does all this at all possible, and how hard would it be for a novice like me if it is possible? Any help is greatly appreciated.

    submitted by /u/RunMrWhiteRun
    [link] [comments]

    My School Has An Investigation going on About This Instagram Page

    Posted: 21 Jan 2021 07:31 PM PST

    someone in my high school created a instagram page surrounding school drama, anyone could fill out a google form and this person would post it on this instagram page. It got really out of hand getting over 300 followers and soon enough the page got taken down. My school launched a investigation to figure out who filled and these forms and who created the page. The reason for the big reaction was because there was sexual comments about high schoolers. The google form was supposedly anonymous with a option to put your name. Is there any way my school can figure out who filled out the google forms, they have every IT person in the district working on the case?

    submitted by /u/booIm_aGhost
    [link] [comments]

    An issue with impersonation (.net 5)

    Posted: 21 Jan 2021 06:54 PM PST

    I am running a .net 5 library that calls cmd to execute the query.exe program. This library is part of a blazor app running in IIS. The app pool is running as the default "ApplicationPoolIdentity" so when the cmd is run, its run under that account. The problem with that is that I don't get the expected output when my library runs query.exe. If I change the app pool to a different user or myself, it works as expected. In the end, I don't want to change the app pool to this user for security reasons. So I tried writing some stuff for impersonation. The problem is that I get the wrong output (same as when it was running under the ApplicationPoolIdentity account). I checked where it's running the cmd by using WindowsIdentity.GetCurrent() and it is using the account I have set up with impersonation. Anyone know how to resolve this. The only working way is to change the app pool account but I don't want to do that for security.

    submitted by /u/Stevecaboose
    [link] [comments]

    Job Trends for programming languages on Indeed is returning a ‘Not found’ error.

    Posted: 21 Jan 2021 03:34 PM PST

    I'm trying to customize the search, so I can find more data on different languages, but the link is broken, can anyone help me fix the link to Indeed? Also, what do you think of the original article?

    Link source (Factor #1: The job market)

    Indeed Link

    submitted by /u/Technical_Natural_44
    [link] [comments]

    How to make a Google Ads API call with Javascript?

    Posted: 21 Jan 2021 02:51 AM PST

    Hi guys, I just want to make a small personal project, I only really know how to use javascript to make little basic web apps. I essentially just want to learn how to create a webpage that displays the google ads account name.

    I just can't figure out how to tell my web page to look at Google Ads!

    They have instructons for Java, .NET, Python, PHP, Perl, Ruby... but nothing for javascript!

    https://developers.google.com/adwords/api/docs/guides/first-api-call

    Am I doing something wrong?

    submitted by /u/_SGP_
    [link] [comments]

    Android Studio Team Work

    Posted: 21 Jan 2021 01:52 PM PST

    My Friends and I have to work on a School Project soon and we decided to Develope an Android App with Android Studio and Java. The only Problem is, we don't know how to share our Code to each other, we don't know how we can work as a Team and we NEVER used GitHub so we also don't know how to use Git?
    Could someone Please Help us??

    Would much appreciate for some HELP! :D

    submitted by /u/sah_nzr
    [link] [comments]

    A novice/beginner (possibly stupid) question about text editors, and OSs

    Posted: 21 Jan 2021 03:14 AM PST

    Okay So I'm a student, and I have been interested in programming/coding for a long time, Ive used and gotten comfortable with Linux and windows, and i know HTML, a bit off CSS and a bit of java script (i don't think they count tho lol).

    I'm planning on picking up Python, and I would like your advice on which code editor to pick, I've narrowed it down to sublime text and VS code, but i don't really know anything about them so I'm confused (feel free to make any other recommendations). And I use both Manjaro Linux with GNOME and good ol' Windows 10 20H2. And so i would also love your opinion on which OS to install and code on too, which is better and which would be worse.

    Thanks!

    submitted by /u/kidemporer_07
    [link] [comments]

    How much IQ is needed for hacking?

    Posted: 21 Jan 2021 06:33 PM PST

    I can make pretty good apps, using noSQL, basically I know how to use APIs. My IQ is probably 100-110 pretty average. I'm kind of into hacking but I get C's in all my math classes lmao. Granted I'm poor as fuck and barely study, I just remember the patterns and do them like discrete maths and calc2.

    submitted by /u/CowBoySuit10
    [link] [comments]

    I'm a 14 year old kid, I'm trying to learn C++ but...

    Posted: 21 Jan 2021 11:34 AM PST

    So, I loved programming when I first saw GameMaker Studio and tried to make games with it, tried Unreal Engine's blueprints too, but since that wasn't really programming, I tried looking at the documentations from Epic games themselves, since it was really outdated, I posted about it on the UE4 subreddit, and a person suggested https://www.learncpp.com.

    After a few months, I feel like I learned pretty basic things about programming but I don't know if C++ is really for me. I sometimes lose motivation, and would appreciate it if you guys helped me.

    ( I'm thinking about either wanting to be a game developer, or a software developer. )

    submitted by /u/One_Beautiful_Lie
    [link] [comments]

    C++ Code to accept target file as input for copy operation

    Posted: 21 Jan 2021 10:29 AM PST

    Strange question here that I am not finding anything solid on. I started thinking about trying to throw something together while modifying some ini files for a few games and was tired of just copying and renaming the files manually to back them up.

    So what I'm working on is a small program that creates an exact copy of a file in the same directory as the current file. For instance, say I have "asdf.txt" and I want to create a backup copy before I modify it. Instead copying the file and renaming it manually, I'm wanting to create a program that I can add to the right-click context menu that will automatically create an exact copy of the file and output the copy as "asdf.txt.bak".

    I know you can drag and drop a file on some programs to automatically open it in said program, so how would I go about implementing the same or similar function? I assume I'm needing to implement code that accepts the file's name as the input file before the copy function is executed. I'm not sure if there is any standard library I should include that already has the functions I'm looking for or if I need to write something from scratch.

    Any input or suggestions is appreciated.

    submitted by /u/DiabolicSpartan
    [link] [comments]

    How do I actually work through finding the time complexity/Big O?

    Posted: 21 Jan 2021 02:32 AM PST

    Hello everyone,

    https://i.ibb.co/gMNrdMc/Screenshot-2021-01-21-042320.png

    Please look at this image link above. It's from a textbook my prof chose for us to use in class. I'm trying to learn time complexity, but it seems like the instructions just skip over how to actually find time complexity. When an example is given, it seems to me like they just state "This algorithm in O(n)" without showing how they came to the conclusion. Isn't there a step-by-step for determining O(n)? I found a tutorial online that has 5 steps for how to calculate O(n), but step two just says "Calculate the Big O of each operation". Well that's exactly what I'm trying to figure out lol. And it seems to be the same thing when I go to other tutorials on YouTube. I don't know if I'm just slow or if I'm missing some prerequisite knowledge....here's the link to the tutorial I spoke about:

    https://medium.com/dataseries/how-to-calculate-time-complexity-with-big-o-notation-9afe33aa4c46

    submitted by /u/pctopgs
    [link] [comments]

    I have a column of strings that correspond to an adjacent Boolean value, should I be automating turning those strings to variables for a Boolean eval?

    Posted: 21 Jan 2021 08:22 AM PST

    Say I have a column with values AAA, BBB, CCC, and adjacent I have values True, False, True.

    I want to be able to check various strings that look like- AAA & (BBB|CCC).

    This is in python and I was considering using eval() for the string evaluation(and security isnt needed). This doesnt solve how to automatically generate variables to correspond with my columns.

    What is best practice for this problem? (I'm using Pandas if that can automate any of this)

    submitted by /u/programmerProbs
    [link] [comments]

    How can I write a buggy program that overwrites its own text?

    Posted: 21 Jan 2021 03:48 AM PST

    Hello, I'm working on a college project, I'm asked to add a feature to the xv6 operating systems.

    In most operating systems, code is marked read-only instead of read-write. However, in xv6 this is not the case, so a buggy program could accidentally overwrite its own text. Try it and see!

    I don't know how to test this, if I wrote some code (in C) that writes to itself it wouldn't work because I would be executing the compiled file so it would have no problem writing to the C file, right?

    Edit: I know they mean overwrite the text segment, so how can I do that?

    submitted by /u/kreetikal
    [link] [comments]

    No comments:

    Post a Comment