Jump to content

shadow_ray

Member
  • Posts

    398
  • Joined

Reputation Activity

  1. Like
    shadow_ray got a reaction from Eigenvektor in I NEED HELP WITH MY C++ HOMEWORK   
    Yes.  This code example shows the basic usage of file streams.
    int n; std::in >> n; std::fstream fs ("data", std::fstream::in); for (int i = 0; i < n; i++) { int tmp; fs >> tmp; std::out << tmp; } fs.close();
  2. Agree
    shadow_ray reacted to BlueSpartan in Linus Tech Tips, Tech Quickie, Tech Linked channels hacked   
    It does make sense that in such a fast-moving area CS would not align with "evergreen" content, but that is also true of other software/hardware things they put out. Nothing is truly permanent. They did the Rubber Ducky video but it was void of any real information or capabilities. Really they just need a side channel for in-depth topics of any kind, since the main channel has to be geared toward normies. 
  3. Agree
    shadow_ray reacted to Needfuldoer in Linus Tech Tips, Tech Quickie, Tech Linked channels hacked   
    "Nah. We don't need a cybersecurity expert system administrator because we're all fairly knowledgeable tech enthusiasts. We know what we're doing."
     
    (Paraphrasing, but that was the gist of the response to "why don't you have a sysadmin" Merch Messages.)
     
    Everyone eventually slips up and lets hubris catch them. It's the curse of the competent.
  4. Agree
    shadow_ray reacted to trag1c in New programmer tools of the trade   
    It is kind of dependent on the program but you really don't need much. Any modern laptop with at least 4 cores and 16 GB of RAM should be sufficient. With that said though, I would opt for a laptop with 32 GB of RAM (or a laptop that you can upgrade to have that) in case you need to run VMs. 1 - 2TB of storage should be more than sufficient, most schools that I have attended have provided some sort of cloud storage like one drive/SharePoint or google drive. So you can place the bulk of your documents there. 
     
    For OS, check what your school is asking for and use it, (I am guessing they recommend Windows). The reason being you may need to run OS specific applications and if you need help/support you may not get it if you're running something other than was is recommended. When I did my schooling (online during the pandemic) we had to use a locked-down browser and it did not run on Linux and trying to run it in a VM is not worth the risk of being accused of cheating. 
  5. Agree
    shadow_ray reacted to Radium_Angel in Trying to decide my path...   
    Ex-coder here.
     
    Though I came from coding before the advent of wide-spread online knowledge. There are a number of college courses that are totally free online (MIT comes to mind) 
    It might be easier to decide on a project to do (for example, catalogue all your books into a searchable database) and figure out the best way to approach that problem, than try to pick up a generalized "do everything" approach.
     
    There are also some fantastic game-coding "kits" on Steam that are either cheap, or free outright. 
  6. Agree
    shadow_ray reacted to Sauron in Trying to decide my path...   
    There is no one way to "start", if you're interested in programming you should just give yourself some simple projects and look up information when you're stuck. All the information you need is available for free either in official documentation, forums like stackoverflow or video tutorials, though obviously lessons or courses help understand and focus that information.
     
    On a side note, you should not mention your age here if you're under 16.
  7. Informative
    shadow_ray reacted to Eigenvektor in how to edit open source code   
    That's how source code generally works, especially of large projects. There will be a ton of source code, split across a ton of different files. Their code seems to be hosted here: https://code.videolan.org/videolan/vlc
     
    You can use a Git client to check it out, then any text editor to have a look at it. If you want to compile it, the project likely has instructions on how to do so. This particular one also includes a makefile to compile it.
     
    They also have documentation to get you started: https://www.videolan.org/developers/vlc.html
  8. Agree
    shadow_ray got a reaction from Eigenvektor in Is it possible to make a temporary Java JLabel variable?   
    In java, variables cannot change types, declare it as a JLabel.
     
    Can you show us the rest of the code? It's not obvious what's happening here. Are those variables object properties?
  9. Informative
    shadow_ray reacted to undergroundbeef in How much waiting do you do?   
    I think my company has around 70,000 and I'm a principal software engineer. The more integrations points there are, the longer the waits. However, there is enough going on that I can work on something else, or my own pet projects, if I'm having trouble moving the ball forward on my main project(s).

    How long the waits end up being are generally a function of the working relationships between the people, how interesting/frustrating the problem is to work on, and who is asking for it.

    There are some people who try to pawn all their work off on others that will ask others to do some nonsense that doesn't make sense. Those people will wait forever, unless it happens to be something interesting/fun. I'll do quick wins pretty quickly, just to get them off my plate. Difficult problems that aren't well understood, require working with difficult people, and aren't seen as important by most people, end up taking a long time to get done... or never get done. One project has been going on for 4+ years now; and the first 3 years nothing happened at all. Then there are days like today where someone in the C-Suite got wind of an issue and wanted it solved, so we had a dozen people on a call for 5 hours and figured it out. Without the pressure from the C-Suite that issue would have taken 6 months or more to solve, as most of the people on the call are typically hard to work with. Most things I'm waiting on could be solved in a few uninterrupted hours with the right group of people on the phone. However, getting anyone to spend more than 30-60 minutes dealing with something is often difficult, and when time blocks are split up into 30-60 minute chunks, the waiting is built into the system and everything takes forever.
     
    Developing good relationships with people seems to be the best way to speed things up. I can get things done in 5 minutes that will take other people several months or years, because I have good relationships with the the right person and I've helped them just as much as they've helped me. Other people can do in 5 minutes what might take me months, for the same reason.
     
    I try to be has helpful as I can, but if I tried to answer every question I wouldn't do anything else. I know this from experience. For a while, I would get a question, go over to the person's desk and help them out, and as I was walking back to my desk, I'd get another... I would just end up taking laps around the room all day. At one point by boss saw what was going on. He moved me into another room and told the whole team that only 1 designated person was allowed to talk to me and all questions had to go through that other person. It was kind of funny. I always spent a lot of time answering the questions, because I wanted people to grow and improve. I also didn't want them to feel like I was too busy to help them, but it can very easily take up 100% of your time, so you have to choose a bit more. I will generally prioritize my own team over outside teams.
     
    And yes... meetings are another big time suck. That's another area where boundaries need to be set to avoid them taking up all your time. The same goes for email and now chats. I hardly ever read my email anymore. Usually things get solved without me and I can quickly scan through and see a bunch of final "issue resolved" emails and not have to bother reading the whole thread. There's too much noise, so I pick my battles. Sometimes that means someone needs to tell me to go read an email that's relevant to me.
     
    If you're waiting longer than you think you should need to, and you're at a stand still because of it, it doesn't hurt to ask for a status. People forget, things fall through the cracks, and people are dealing with competing priorities. If they got a notice once 2 weeks ago and never heard about it again, it's probably not even on their radar anymore. You want to avoid being annoying if you can, but sometimes it comes to that.
  10. Agree
    shadow_ray reacted to wasab in How much waiting do you do?   
    nil waiting. less than 20 people but the projects we worked on have teams around the globe and is much larger. we focus on our own piece of software which has no downtime in development although there are blockers from other teams and firms who worked on the microservices which we will need to wait for before integrating. of course, there are always endless mountain full of bug tickets from both staging and production enviorments, some of which have not been resolved for months and probably never will. people can work all day if they want. there is never shortage of tasks. internal communication is as quick as 1 minute skype message/chat. communications with other teams, many whom live on the otherside of the planet is like a full day(your daytime is their nighttime). maybe three days if you contact them on friday and it happens to be saturday where they live. more time if they are on national holidays or something. 
  11. Agree
    shadow_ray got a reaction from Toxocious in Problems faced while learning data structures and algorithms:   
    Solve the problem in the brute force way first, then try to come up with better solutions. How would you do it by hand? Write some numbers on sticky notes then try to remove the duplicates.
    Spend as much time as you think is reasonable, there is noting wrong with looking at solutions, just make sure you understand what every line does  and don't copy paste code.
  12. Like
    shadow_ray reacted to Kilrah in I'm trying to use ChatGPT to save OLED displays with pixel control, can someone help with an exe? C++ Windows   
    Do you really want to be looking at a display extremely obnoxiously flashing ugly stuff at you? 🤷‍♂️
  13. Agree
    shadow_ray got a reaction from Eigenvektor in Problems faced while learning data structures and algorithms:   
    Solve the problem in the brute force way first, then try to come up with better solutions. How would you do it by hand? Write some numbers on sticky notes then try to remove the duplicates.
    Spend as much time as you think is reasonable, there is noting wrong with looking at solutions, just make sure you understand what every line does  and don't copy paste code.
  14. Agree
    shadow_ray reacted to mononymous in Why does anyone still pay to have a custom site developed when WordPress seems to be able to do everything with the right plugins?   
    You can have a security vulnerability. This was a wordpress based site and was a shop as well as a support page for those who bought the products. One of the plugins was set to default settings, so images of invoices for proof of purchase was easily viewable through the url. Personal info like name, address, phone number and email address were present. 
     
    When I contacted the company they were in the process of building a new site. The company is relatively new (circa 2013) so it is probable that they built the original site themselves but wasn't able to notice the security flaw. 
  15. Agree
    shadow_ray reacted to Eigenvektor in What technical advancement in a year for a software??   
    Version numbers don't tell you anything about how long it took to develop that version. It's entirely possible version 4 has been in development for several years. In the meantime version 3 will still receive bugfixes. Even if version 4.0 came out only a day after 3.5, that doesn't mean it was developed in a single day.
  16. Agree
    shadow_ray reacted to mariushm in simple pig latin codewars kata problem   
    It's Javascript ... 
     
    In Javascript, you can call functions on variables by just saying dot and name of the function after the variable
    So  str is a variable name, and str.split( ' ' )  will call function split  that takes the content of variable str  and splits it based on where the space character is detected, and it returns an array of strings. 
    Now, on each of the elements of the array of strings, the function .map()  is called  which does something else.
     
    In Javascript, you can create temporary functions just by writing   ( parameters of the function )  =>  { what the function does  }
    So
    (word)=>{ if(['!', '?'].includes(word)){ return word; } else { return word.slice(1) + word[0] + "ay"; } } is actually an in-line  function without  a name, it doesn't need one because it's only used by the map function 
    He could have written the code like this for more readability:
     
    function Check(word) { if(['!', '?'].includes(word)){ return word; } else { return word.slice(1) + word[0] + "ay"; } } function pigIt(str){ return str.split(' ').map(Check).join(' '); } The map function runs the function given to it as a parameter on each string it was called with (because it's called multiple times, for each element of the array returned by the split function previously.
    The words are replaced with the result of the function check, and then finally, all the elements of the array are glued back together by calling the function .join with the character space as glue element.
     
    .includes is also a function, returns true if the string contains that word ... so basically the includes is called twice, once by the ! string, then by the ? string
    and it's compared against the string received by the function as parameter
    .slice returns a substring, starting from the offset specified as parameter ...
     
     
  17. Agree
    shadow_ray reacted to wasab in What should I do Before I give up programming?   
    Instead of road map of what you should learn, create a road map of what you want to accomplish. 
     
    I.e. you can say I want to create a shopping website. First month, I will create a working home page with dummy categories and dummy products on display.
     
    2nd month I will create database and backend server with these products and have my home page grab data from the backend instead of dummy. 
     
    3rd month I will create category listing page and product search page and also the backend for it ect. 
     
    4th month I will have a cart page, user login, session, and the backend api for it as well and ect. 
     
    If you know what you want to do then you already know what you need to learn. You will google up things and watch tutorial as you implement each feature and pieces of your web application. Whatever you do, don't give up part way. Finish a feature to the end. If you feel like they are done, think up more! E.e, I will now create an admin page for adding products and ect. Soon enough you will have a huge code base and be amazed at what you had accomplished. 
     
    Oh, btw, don't worry too much if your webpage looks bad. When i work in react, it is always functionality first and then looks with css/less, styled component, whatever else styling library next. 
  18. Agree
    shadow_ray reacted to wasab in What should I do Before I give up programming?   
    Yes if you don't like programming which is what you seem to be hinting at. Those who are passionate about coding do not become frustrated and do not give up after becoming hopelessly confused. Rather they spend more hours hacking away at the code trying to figure out what is going on or going down(the joy of debugging).
     
    People do not like programming because it is easy but rather it becomes easy because they like programming. Looking at your projects, these are definitly not works that are worth 3 months of efforts. I wrote more lines of code in a single weekly homework assigment back in college than two or three of your projects combined. You just need to devout more effort, time investments, and energy into it. 
     
    Don't kill yourself tho. When I started out coding, for the first day, I literally spent 8 hours hacking away at my code editor. You will get burn out fast doing it like what I did. Just spend 2 hours per day hacking away at the code and perhaps once a week doing a longer session marathon trying to pierce everything together. Don't do many small projects, rather focus on a single big project spanning over many months with set milestones. More the features you want your single app to have the bigger it becomes and thus more time you will spent on it. You will get a good sense of your progress and get better at programming skills compared to just starting one thing, quit half way thinking it is too hard and start another thing, quit half way after just an hour or two thinking it is too hard and repeat the cycle. Trust me, that is how my professors teach senior software engineering and it is much better than doing small coding assigments.
  19. Agree
    shadow_ray got a reaction from wasab in Programming Laptop / Chromebook ?   
    Make sure the ram can be upgraded, 8GB is not too much nowadays.
  20. Like
    shadow_ray got a reaction from BoomerL4D in How i can edit those scripts in chome DevTools, i think is Java.   
    And the changes you make in devtools will be thrown away when your reload the page. If you want to change the page every time the browser loads it then create a chrome extension or a tampermonkey userscript.
    https://developer.chrome.com/docs/extensions/mv3/getstarted/
    https://www.tampermonkey.net/
  21. Agree
    shadow_ray reacted to mariushm in What happens when return is executed in this code?   
    Let's  go through it step by step. Probably gonna get something wrong but that's how I imagine it.
     
    Everything starts with
    window.requestAnimationFrame(main); In browser's memory there's a LIST of  function names, of what functions - if any - to call when browser is ready to do that frame.  The function above just puts an entry in the list saying "browser, when you're about to do that frame, call the function named main".  The function exists as soon as "main" is added to that LIST.
    Your main function DOES NOT run at this point.
     
    At some point in the future, could be right away, could be milliseconds, could be seconds later, when browser is about to do that frame, it looks up in the internal list to see if there's some callback function there and finds the "main" function there. So, the browser deletes the only entry from the internal LIST making the list empty and then launches main function and waits until the main function finishes to start rendering/drawing/whatever the frame.
    Now you're inside the main function.
    In the main function, you do .requestAnimationFrame again adding yourself (the main function) as callback function. The requestAnimationFrame looks up at that internal LIST and adds the main function as callback and exists. Now, control comes back to the main function which checks if enough time has passed since it last ran, and if not enough time has passed the main function just exists.  If enough time has passed, the function updates the last time variable and runs the game logic by calling GameEngine();
    After GameEngine() runs, the main function exists and the browser finally "paints" / renders/ draws  the frame
     
    After the browser finishes updating the frame, and maybe a few ms more (for example browser may do 60 fps which means one frame every 1000/60 = 16ms but finishes rendering the frame in ms, in this case browser may waits 15 ms doing nothing)  it's time for browser to render another frame, so it looks again in that internal LIST and spots the entry which says it should call "main" function again, so it removes the entry from the list (making the list empty) and calls main function.
     
    If the main function doesn't add itself to that internal LIST every time by using the requestAnimationFrame function, the internal LIST will be emptied and the main function will no longer be called.
     
    I think what you don't understand is that requestAnimationFrame is sort of async, it just puts the function name in an internal list and exists, it doesn't launch the main function right there, the main function is queued to run at some point in the future when the browser is about to draw another frame.
     
     
     
  22. Funny
    shadow_ray reacted to Eigenvektor in Should chatbot be allowed in troubleshooting?   
    No, but some recent answers in Troubleshooting look like the person took the question, posted it to e.g. ChatGPT, then posted the bot's answer as their answer.
  23. Like
    shadow_ray reacted to podkall in Reminder that Epic Games gives away FREE games daily on December. (Today it's Death Stranding)   
    Grab Death Stranding in Epic Games Store, before it becomes 25€ again: https://store.epicgames.com/en-US/p/death-stranding
     

  24. Agree
    shadow_ray reacted to Vicarian in Get HTML of a website using Ajax   
    I have to imagine you're probably coming across Cross Origin request errors.  Take a look at the network tab of the dev tools of the browser you have this running in.  You'll be able to see more detail about the request and why it was rejected.
  25. Agree
    shadow_ray got a reaction from Eigenvektor in Help with Mode Ties in Java   
    You can use sorted maps to count the occurrence of each different value and then get a sorted list of each key value pair.
    https://docs.oracle.com/javase/8/docs/api/java/util/TreeMap.html
     
     
     
×