Software Development and Programming Careers (Official Discussion Thread)

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,300
Reputation
5,571
Daps
83,590
Something I'm interested in doing is bringing over some of the problems from project euler and seeing how everyone handles them. It'll be an interesting exercise that will allow some of the more senior programmers to critique the less senior programmers in order to improve their skills.
 

semtex

:)
Joined
May 1, 2012
Messages
20,310
Reputation
3,396
Daps
46,188
I think I pretty much alluded to this programming languages do very much the same thing, sure there are different conventions but apart from the paradigms of programming the concept is a rehash.

I got a few questions for you programming guys here.

How do you know when a variable is stored in ROM or RAM?

What is an interrupt vector?

What is a watchdog timer?

Provide an example of an inadvertent RAM overwrite ie data corruption (informally known as 'ram whacking', data corruption).

What is the difference between NVRAM and RAM?
Computer Engineering stuff :manny: Don't know a lick of it. Pure software engineer here.
 

keepemup

Banned
Joined
Jun 9, 2012
Messages
4,743
Reputation
-982
Daps
5,349
Computer Engineering stuff :manny: Don't know a lick of it. Pure software engineer here.
I'm software too, even though I went to school for computer and electrical.

I would have to guess that you do not work with embedded real-time systems, where memory and processing is at a premium because the processor is often buried within a car, washing machine, ie something that cannot be easily accessed and tinkered with; hence the term 'embedded'.

The constraints force us to be very judicious with memory, therefore the need to know which variables will occupy rom and which will occupy ram.

We need to know exactly the handling of interrupts; ie perhiperals that have new data for the processor.

And if the software takes too long to handle the interrupt the watchdog timer will stop the processor because there is an error; the interrupt must be handled in a specific amount of time otherwise the real-time system may cause harm to people.

Sometimes when we try to get slick with our structures and to assign a pointer and traverse memory with pointer arithmetic one can often end up at an address that was unexpected, resulting in possible data/memory corruption.

Something I'm interested in doing is bringing over some of the problems from project euler and seeing how everyone handles them. It'll be an interesting exercise that will allow some of the more senior programmers to critique the less senior programmers in order to improve their skills.

Please do.
 

semtex

:)
Joined
May 1, 2012
Messages
20,310
Reputation
3,396
Daps
46,188
I'm software too, even though I went to school for computer and electrical.

I would have to guess that you do not work with embedded real-time systems, where memory and processing is at a premium because the processor is often buried within a car, washing machine, ie something that cannot be easily accessed and tinkered with; hence the term 'embedded'.

The constraints force us to be very judicious with memory, therefore the need to know which variables will occupy rom and which will occupy ram.

We need to know exactly the handling of interrupts; ie perhiperals that have new data for the processor.

And if the software takes too long to handle the interrupt the watchdog timer will stop the processor because there is an error; the interrupt must be handled in a specific amount of time otherwise the real-time system may cause harm to people.

Sometimes when we try to get slick with our structures and to assign a pointer and traverse memory with pointer arithmetic one can often end up at an address that was unexpected, resulting in possible data/memory corruption.



Please do.
01-forrestgump-bubba.gif
 

Double J

Banned
Joined
May 11, 2012
Messages
1,929
Reputation
-665
Daps
5,264
Killing Java right now.

I first started programming about a year ago and then in May I took some time off and at the time I was alright at it but nothing special. I got back into it around September and now I'm MUCH better than I was. Before when I was programming I would be able to get certain projects finished but a lot of the times I would get my solutions from the web or from a book and I wouldn't understand WHY the program worked or WHY I had to add a certain feature, etc. Now I get the reason behind a lot of things and that has subsequently made me a much better programmer. And not only that, but before I would have to follow the book step by step while writing code but now I can do it off the top of my head like it's second nature.

And the biggest reasons why the concepts are sinking in much better than they were before and why I'm much more skilled now are time and dedication. One thing prospective programmers, developer's, or engineer's need to realize is that programming is pretty much like every other thing in life: you are not going to get good at it unless you put in the time and the work. That's why you have to truly enjoy writing code because if you don't you will never do it enough to become good at it.
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,300
Reputation
5,571
Daps
83,590
Let's start off with a simple one. I'm interested in seeing how everyone approaches this one

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.

https://projecteuler.net/problem=1
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,300
Reputation
5,571
Daps
83,590
probably not the most elegant solution, but here is what i got with Javascript
Code:
var sum = 0;

for(i = 3, j = 5; i < 1000; i=i+3, j=j+5)
{
  
  if(j < 1000)
  {
  if(j % 3 !== 0)
  {  
  console.log("inner" + j);
  sum = sum + j;
  }
  }
  
  console.log(i);
  sum = sum + i;
}

console.log("The sum is " + sum);

My output is:
The sum is 233168

c++ version
Code:
#include "stdafx.h"
#include <iostream>
#include <string>

using std::cout;
using std::cin;
using std::endl;

int _tmain(int argc, _TCHAR* argv[])
{
   int sum = 0;
   int i, j;

   for (i = 3, j = 5; i < 1000; i = i + 3, j = j + 5)
   {

     if (j < 1000)
     {
          if(j % 3 != 0)
              sum = sum + j;
     }

     sum = sum + i;
   }

   cout << "The sum is " << sum << endl;

  return 0;

}
 
Last edited:

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,300
Reputation
5,571
Daps
83,590
@kevm3 I didn't look at your answers but I would
Mod every number up to 1000 by 3 and 5 and if mod = 0, add the number to a running total

My solution was a bit different. That's why I find exercises like this enjoyable. People will simply tackle the problem in different ways.

I had to make a quick alteration to my original solution to eliminate duplicates. It is now complete.

With your solution, you have to deal with the same issue. There will be duplicates. For example 15 will be added twice to the sum since 15 is a multiple of both 3 and 5. How would you get rid of duplicates?
 
Last edited:

Double J

Banned
Joined
May 11, 2012
Messages
1,929
Reputation
-665
Daps
5,264
Let's start off with a simple one. I'm interested in seeing how everyone approaches this one

Here's my solution in Java:

Code:
public class multiples{

   public static void main(String[] args){
  
      int num = 1, sum = 0;
     
      for(int i = 1; i < 1000; i++){
      
       if(num %  3 == 0 || num % 5 == 0){
        
         sum += num;
        
         }//end if
        
         num++;
        
      }//end for loop
        
      System.out.println("The sum is " + sum);

   }//end main method
}//end class

My answer was 233168.
 
Joined
May 10, 2012
Messages
19,363
Reputation
6,290
Daps
42,658
My solution was a bit different. That's why I find exercises like this enjoyable. People will simply tackle the problem in different ways.

I had to make a quick alteration to my original solution to eliminate duplicates. It is now complete.

With your solution, you have to deal with the same issue. There will be duplicates. For example 15 will be added twice to the sum since 15 is a multiple of both 3 and 5. How would you get rid of duplicates?


Yeah, I just wrote the basic solution without going into detail, but I would just need to do an OR statement like @Double J
 

Data-Hawk

I have no strings on me.
Joined
May 6, 2012
Messages
8,420
Reputation
1,985
Daps
16,303
Reppin
Oasis
I want to teach myself coding. I plan on going into Network Security and figured if I had the learned ability to code programs then I could strengthen security knowledge and know-how by coding my own protective/defense programs to deploy in my work. maybe I'm thinking too grand and large, but Coding is some ill shyt to learn.

Depends on the type of security expert you want to be. at the very least you'll want to know a scripting language, here you go:

Python seems to be growing in the security area:



But if you want to be among the elite and be able to develop your own exploits, I recommend Assembly language + C
 

Data-Hawk

I have no strings on me.
Joined
May 6, 2012
Messages
8,420
Reputation
1,985
Daps
16,303
Reppin
Oasis
Not programming related, but I need to up my Photoshop skills. Plus I might start playing around with Pixel art( think Hyper Light Drafter )
 
Last edited:

Nomadum

Woke Dreamer
Joined
Dec 23, 2014
Messages
4,622
Reputation
-705
Daps
9,074
Reppin
Nothing
Depends on the type of security expert you want to be. at the very least you'll want to know a scripting language, here you go:

Python seems to be growing in the security area:



But if you want to be among the elite and be able to develop your own exploits, I recommend Assembly language + C

Thanks for the heads up. only question I have is, what exactly is an Assembly Language? and why did you suggest C over C++? I know alot of people like C++ and I seldom hear folks mention C, which is why I'm asking.
 
Top