Remove ads, unlock a dark mode theme, and get other perks by upgrading your account. Experience the website the way it's meant to be.

Programming • Page 2

Discussion in 'Technology Forum' started by Dirty Sanchez, Mar 5, 2016.

  1. Nick

    @fangclubb Prestigious

    hahahah if I was learning it I'd need to come up with an app or a tangible program to build, and I'm terrible at coming up with ideas.
     
  2. noxee

    Regular Prestigious

    SomedayTheFire likes this.
  3. Nick

    @fangclubb Prestigious

    and bookmarked.

    i was creating an android app for stocks (I know there are loads of them but I wanted a quick simple app that could give me all the info I needed) but i realised that doing a web app would be a better idea so I'm gonna start that up when I finish the courses I'm doing.
     
  4. Im pretty decent with CSS and HTML. I can tear apart and fake it with some PHP. Otherwise, I'm pretty useless (not for a lack of trying!) I'm actually looking for some music-minded people with SQL experience for a project. This might be a cool place to find someone to work with.
     
  5. Used MariaDB for the first time on these forums — actually really impressed with it. Will probably use it instead of MySQL in the future.
     
  6. Timmiluvs

    I play video games fast Prestigious

    I use MongoDB for stuff at work and I much prefer it over SQL. Granted we're just kinda using it as a JSON dump, but it has a lot of great functions to process and aggregate that data for us when we pull it.
     
    SomedayTheFire likes this.
  7. Nick

    @fangclubb Prestigious

    Yeah I far prefer Mongo to sql. Like working with it. But yeah it was a JSON dump for me too.
     
  8. Dirty Sanchez

    Prestigious Prestigious

    Making a compiler is very fun. i'm talking a class called, compilers. It's pretty awesome making your own programming language.
     
  9. Timmiluvs

    I play video games fast Prestigious

    My school had a compilers class but it hasn't been offered in years. My Operating Systems teacher is going to revive it...after I graduate.
     
    Dirty Sanchez and SomedayTheFire like this.
  10. Nick

    @fangclubb Prestigious

    yeah that was pretty cool. we went from haskell to compilers. functional programming really helped with the concepts of compilers. what are you using? we used javaCC
     
  11. Dirty Sanchez

    Prestigious Prestigious

    It's all written in Python with some MIPS assembly.
     
  12. Nick

    @fangclubb Prestigious

    haha MIPS that was great, we had a double class first x86 then MIPS. remember spending hours trying to make pong in x86.
     
    Dirty Sanchez likes this.
  13. Dirty Sanchez

    Prestigious Prestigious

    I had a class who one day introduced X86 to us by just stating that there are registers and that you use them. The next class, he gave us a lab assignment to do which consisted of reading a 2000+ line file of text and counting the occurrences of every letter a-z and then count every word as well.

    I dropped that class and took it again a year later lol. That professor was let go the semester after since his research was subpar and that was a requirement to become an associate professor and his 6 years were up.
     
  14. danielalee12

    Regular

    I'm a python user(use it daily at my job) but am about to finish a web dev bootcamp that teaches javascript (node.js).
    Let's just say python is a tad easier on the eyes..
     
  15. DeviantRogue

    Take arms, it'll all blow over Prestigious

    Any help is appreciated here, I'm kind of lost on this one, been a busy week and the logic is not fitting my brain right. (This is due in 2 hours, EEK) C++

    //function isPrime
    //input parameter - positive integer greater than 1
    //returns true if the number is prime, otherwise false
    //
    bool isPrime (int number);



    //function findPrimes
    //input parameter - positive integer
    //Uses the isPrime method to print a list of prime numbers between 1 and n.
    void findPrimes (int n);


    //function findFibo
    //input parameter - positive integer
    //returns the nth fibonacci number where
    //Fib(0) -> 0
    //Fib(1) -> 1
    //Fib(N) -> Fib(N-2) + Fib(N-1)
    //Note: You must use a loop in your solution. Also, if passed a 0, return 0.
    int findFibo (int n);


    //function findFactors
    //input parameter - positive integer
    //prints the prime factors of the given number to standard output (cout)
    //example output: 52=2*2*13 (or 52=1*2*2*13) or 13=prime
    //Hint: You will need nested loops for your solution.
    void findFactors (int number);
     
  16. Dirty Sanchez

    Prestigious Prestigious

    bool IsPrime(int number)

    {


    int num;

    for (num=2; i<number; i++)
    {
    if (number % num== 0)
    {
    return false;
    }
    }

    return true;
    }
     
    DeviantRogue and stnewton like this.
  17. DeviantRogue

    Take arms, it'll all blow over Prestigious

    Professor outlined that it's supposed to be a while loop instead of for;

    it looks something like

    bool prime = true;
    while (!prime && _______) (left blank but I assume thats just num > 0)
    if (number % factor == 0)
    prime = false;
     
  18. Dirty Sanchez

    Prestigious Prestigious

    int findFibo(int n)
    {

    if (n <= 1)
    return n;
    return fib(n-1) + fib(n-2);
    }
     
    DeviantRogue likes this.
  19. Dirty Sanchez

    Prestigious Prestigious

    void findFactors (int number);

    for(int i=1;i<=number;i++)
    {
    if(n%i==0)
    cout << i << endl;
    }
     
    DeviantRogue likes this.
  20. Snewt

    Does whatever a spider can. Prestigious

    I don't understand why you need a while (or for, to be honest) loop when the parameter only accepts a single Int. But my experience is limited to Objective-C. Seems like just an if statement would do the trick.
     
  21. Snewt

    Does whatever a spider can. Prestigious

    I could see why the findPrimes func would need a loop though
     
  22. DeviantRogue

    Take arms, it'll all blow over Prestigious

    To find if a number is prime you have to run a loop for every divisible factor up to the number itself.
     
  23. Snewt

    Does whatever a spider can. Prestigious

    haha yep, one too many beers had me thinking something else

    edit: the while loop makes sense then, that way it breaks the loop if it finds a match rather than executing the entire loop
     
    DeviantRogue likes this.
  24. DeviantRogue

    Take arms, it'll all blow over Prestigious

    oops got the isPrime function confused with the while loop for findPrimes.

    edit: or not, I'm confusing myself.. I should take better notes
     
  25. DeviantRogue

    Take arms, it'll all blow over Prestigious

    yeah I'm having a tough time with making that for function into a while loop
     
    Dirty Sanchez likes this.