• Breaking News

    Friday, March 15, 2019

    OOP To Procedural Ask Programming

    OOP To Procedural Ask Programming


    OOP To Procedural

    Posted: 15 Mar 2019 07:02 PM PDT

    Hi everyone,

    I've programmed in C++ for a while now using lots of OOP, but I want to start to try and move away from using so many classes. How would I get started in thinking in a more procedural way (right now my brain comes up with very object-oriented approaches for things).

    For example, I've made a few very small games and they've all been set out with a Game class, with Player and Enemy and Tile etc. being other classes instantiated from Game. How would a game that uses more procedural code be set out?

    Any help would be appreciated, thanks

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

    People who worked for consulting agencies, what were/are your opinions?

    Posted: 15 Mar 2019 04:20 PM PDT

    I was contacted by a recruiter for a local consulting company (basically they do short term dev contracts for other companies). After having my first technical interview, and getting a very wide range of tech questions, it seems a bit intriguing. If I were hired, it sounds like I'd get assigned to work at a company for a few months or more doing anything from desktop to web development, which is pretty much what I do right now, except I have a twinge of embedded software development every now and then. I have always thought about getting into consulting work, and maybe someday get to the point where I'm on own, but I've never known how to get into it.

    So my question is this: those of you who have done work like that, working for a company, what are your thoughts? Was it fun or painful? Did you dread certain kinds of work or certain companies?

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

    C++ SDL Uint32, Lack of understanding, lots of questions, any help appreciated

    Posted: 15 Mar 2019 12:11 PM PDT

    Uint32 get_pixel32( SDL_Surface *surface, int x, int y )

    {

    //Convert the pixels to 32 bit

    Uint32 *pixels = (Uint32 *)surface->pixels;

    //Get the requested pixel

    return pixels[ ( y * surface->w ) + x ];

    }

    This is a function i found online at lazyfoo(http://lazyfoo.net/SDL_tutorials/lesson31/index.php) that returns Uint32 that represents the ARGB of a single pixel selected from an SDL_Surface. It seems to work but i really really dont understand whats happening here. I haven't been able to find anything online that actually explains what's happening, and i'm not even sure if im confused about c++, SDL, or the Uint type. Maybe all three. Here are my questions.

    Why creating a pointer?

    Why cast to Uint32 pointer?

    Is surface->pixels not of the same type?

    The function shouldn't return a pointer, why are we returning a pointer?

    How can this work?

    Why use brackets as if the pointer (Uint32 *pixels) is an array?

    How does this get a pixel?

    Is Uint32 potentially an array?

    If it is an array, how is it being declared without []?

    Is it an array of pointers, or a pointer to an array in SDL_Surface?

    How big can a Uint32 be?

    Thought it was 32 bits

    Any help is appreciated, thanks!

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

    How do you approach changover from one language version to another in a large project?

    Posted: 15 Mar 2019 07:34 AM PDT

    After testing and working out bugs in the newer version you're changing to. Do you then get everyone using that new version on development immediately? Do you bring prod to that new version at the same time, before, after? What is your policy on using any new syntax, do you wait at all or restrict usage of new syntax for a period in case a rollback is needed?

    We've had disagreements between operations and dev lead on the best way to do this. Wondering how others with large codebases and teams approach this.

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

    OS module in Java

    Posted: 15 Mar 2019 03:46 PM PDT

    Do java have a OS module like python? I would like to know what OS the user is using, since I want to execute something in the terminal/cmd and need to know OS.

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

    exit status -1 while trying to do a selection sort in c++11

    Posted: 15 Mar 2019 06:29 PM PDT

    I keep getting exit status -1 while trying to do a selection sort and i dont know why because i copied the textbook code.

    My selection sort is the reason for the exit status but i dont know why. Any help is appreciated

    #include <iostream>
    using namespace std;
    void selSwap();
    void selectionSort(int selectionArray[], int size);
    void counterOutput(int counter);
    void swap();
    int main() {
    const int size = 20;
    int bubbleArray[size] = {20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1};
    int selectionArray[size] = {20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1};
    selectionSort(selectionArray, size);
    }
    void selectionSort(int selectionArray[], int size)
    {
    int selMinIndex = 0;
    int selMinValue = 0;
    for (int selStart = 0; selStart < (size - 1); size++)
    {
    selMinIndex = selStart;
    selMinValue = selectionArray[selStart];
    for (int selIndex = selStart + 1; selIndex < size; selIndex++ )
    {
    if (selectionArray[selIndex] < selMinValue)
    {
    selMinValue = selectionArray[selIndex];
    selMinIndex = selIndex;
    }
    }

    }
    }

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

    SQL - Nooby Question

    Posted: 15 Mar 2019 12:06 PM PDT

    I couldn't format my comment into plaintext, so here's an image of my question if that is allowed :/

    https://imgur.com/CcbSNll.png

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

    Implementing a filesystem

    Posted: 15 Mar 2019 04:35 PM PDT

    Hello everyone,

    I'm trying to implement a very simple filesystem in C/C++ as part of a course at college. (For learning purposes)

    I found a couple of resources online but I feel lost and I don't think I understand much of how to implement it. I understand how a filesystem works generally but I have no idea where to start.

    Does anyone have any tips to help? Such as prerequisites or ways to make things simpler to start.

    Thanks a lot in advance.

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

    Compareing binary trees [C]

    Posted: 15 Mar 2019 04:17 PM PDT

    Hello everyone,

    I'm supposed to create a program that will compare 2 or more binary trees, and I'm stuck right now....
    As an input I will get a numbers (for example: 8 4 2 9 1), from these numberes I will creat a binary tree and compare it with another one. The problem is that I don't know how to make this program simple. I have soem ideas but I feel like it would be too complicated. Because I don't want to create a huge array or try to 'draw' these binary trees and then compare them. I feel like there is a simplier solution.

    So if you guys have any ideas I would be very thankful. I don't want codes or anything, just some ideas so I can at elast begin writing the code.

    Thanks

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

    Is there a way to use google photo's facial recognition externally?

    Posted: 15 Mar 2019 04:16 PM PDT

    Google photos has a great feature that lets me search "me" and it brings up pictures of me pretty accurately. I was wondering if I could use this to look through a website and identify pictures of me also. This site has a ton of folders, and I think I could figure out web scraping on my own, but I just want to know if it is possible to implement photos API or something of the sort. If not, I supposed I could find a way to upload all the photos to an album in Google photos, or something else. Any suggestions are appreciated.

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

    Dealing with JavaScript in Web Scraping

    Posted: 15 Mar 2019 03:58 PM PDT

    I have created a bot using Scrapy and BeautifulSoup but I have encountered an input box which uses JavaScript and Scrapy cannot deal with JavaScript properly.

    I am not sure what to do, do I

    1. Abandon Scrapy for something that can also handle JavaScript such as Puppeteer?
    2. Use something else with Scrapy that can deal with the JavaScript.
    submitted by /u/dietderpsy
    [link] [comments]

    Looking for a Forensic Data Analyst in London to analyse a hacked device used as a remote microphone.

    Posted: 15 Mar 2019 03:46 PM PDT

    I was a victim of a series of crimes and later found out that my roomate's mobile had been hacked to be used as a remote microphone to sabotage my efforts to defend myself. I'm looking for a Forensic Data Analyst based in London to analise a device for traces of the spyware that was installed. I contacted these three different companies already but all of them said they don't do that kind of work:

    https://www.blackhawkintelligence.com

    https://forensiccontrol.com

    https://www.itgroup-uk.com

    Can you recommend me a professional company that does that kind of work? Thanks!

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

    Are there any projects going around on this subreddit that I can get involved with?

    Posted: 15 Mar 2019 12:36 PM PDT

    I've got some free time on my hands and was wondering whether there were any cool projects going around that I could contribute to, or whether anyone would be interested on working on something completely new.

    I do iOS and full-stack as a profession, but I'm happy working on anything.

    If anyone's interested let me know!

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

    Need help making music website!!!!!

    Posted: 15 Mar 2019 11:53 AM PDT

    Hello, I am currently creating a music website. I am not very good at coding and need serious help. I am working with html, php, and sql at the moment. I want to be able to upload music files to sftp server/database and then make a playlist of these songs on the website. I also would like to be able to create a search feature on the website to search for songs on the server/database and be able to play them. Can anyone assist me with this? I am desperate! DM me! Thank you.

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

    Is COmmon Business-Oriented Language a DSL?

    Posted: 15 Mar 2019 08:24 AM PDT

    What kind of commitment does qualifying for a programming job take?

    Posted: 15 Mar 2019 03:21 AM PDT

    I took a programming class in high school and really enjoyed it and felt like I had a natural knack for it and was thinking about maybe trying to get a job in that field until I can get the education I need for the career I really want (in concept art). I hear sometimes about how people in tech tend to be exempt from standard "job requirements" as long as they are good at what they do - how much truth to that is there? Do I have to have a degree and experience to get a job in tech or can I realistically self teach and get a job on the basis of proving myself and showing that I can do the job?

    I'm kind of at a crossroads at the moment because I am not sure if I should commit my time and money to learning how to code when I really want to go down a totally different path, but at the same time I recognize that going down the coding route might be a good idea to support myself financially for the moment. But I feel like I only want to go down that route if I can do so without getting a degree and spending a lot of money (money that I need for art classes).

    Anyways, just appreciate any thoughts or advice that anyone has to offer. Thanks!

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

    No comments:

    Post a Comment