Software Development and Programming Careers (Official Discussion Thread)

Renkz

Superstar
Supporter
Joined
Jun 12, 2012
Messages
7,814
Reputation
2,310
Daps
18,031
Reppin
NULL
Well with normalization, you are actually splitting a bigger table into smaller table, and the right degree of normalization helps a lot with the speed of queries.
You never want to have all your data in one table because it will possibly create a lot of duplicate data and it will be fairly slow.
I know, but my client is not giving me much to work with here, he provided samples of how his reports are, but then adds he he wants other columns that are were not in the samples provided, so it's up to to my group to make sense of the business logic, but we're not seeing much of a correlation to break it down. I think we have be a bit more forceful with my client to drop the beans of what he wants :demonic:
 

KritNC

All Star
Joined
Jun 5, 2012
Messages
3,440
Reputation
610
Daps
4,085
Reppin
Costa Rica
I know, but my client is not giving me much to work with here, he provided samples of how his reports are, but then adds he he wants other columns that are were not in the samples provided, so it's up to to my group to make sense of the business logic, but we're not seeing much of a correlation to break it down. I think we have be a bit more forceful with my client to drop the beans of what he wants :demonic:
https://s3.amazonaws.com/uploads.hipchat.com/21091/899079/bfTJgMZP6bdSDDS/The Language of SQL.pdf
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,291
Reputation
5,551
Daps
83,482
If your team is finding it difficult to give the client what he wants, best to just let him know exactly the problem and how much more it could cost if he doesn't allow for you to make whatever changes need to be made.
 

Renkz

Superstar
Supporter
Joined
Jun 12, 2012
Messages
7,814
Reputation
2,310
Daps
18,031
Reppin
NULL
Write a function to determine if a number is even without using multiplication, division or modulo (*, /, %). Return true if it is even, false if not. For simplicity, it has to be a non-negative integer input into the function, i.e.:

int num= 987;
result = isEven( num);

And then print the result
public class Q1 {

public static boolean isEven(int x)
{
if(x>=0)
{
String temp = String.valueOf(x);

if(temp.substring(temp.length()-1).contains("0"))
{
return true;
}
if(temp.substring(temp.length()-1).contains("2"))
{
return true;
}
else if(temp.substring(temp.length()-1).contains("4"))
{
return true;
}
else if(temp.substring(temp.length()-1).contains("6"))
{
return true;
}
else if(temp.substring(temp.length()-1).contains("8"))
{
return true;
}
}
return false;

}

public static void main(String[] args) {

int x;
x = 987;

for(int i=0; i<11;i++)
{
if(isEven(i))
{
System.out.println(i + " is an even number");
}
else
System.out.println(i + " is an odd number");

}

if(!isEven(x))
{
System.out.println(x + " is not an even number");
}

}

}


output
0 is an even number
1 is an odd number
2 is an even number
3 is an odd number
4 is an even number
5 is an odd number
6 is an even number
7 is an odd number
8 is an even number
9 is an odd number
10 is an even number
987 is an odd number

Thing took me longer than I expected
 

Renkz

Superstar
Supporter
Joined
Jun 12, 2012
Messages
7,814
Reputation
2,310
Daps
18,031
Reppin
NULL
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);

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;

}
public class Q2 {

public static void main(String[] args) {
int x = 0;
for(int i =0; i <10; i++)
{
if(i % 3 == 0)
{
x = x +i;
}

else if(i % 5 == 0)
{
x = x +i;

}

else if(i % 9 == 9)
{
x = x +i;

}
}

System.out.println("Nautral numbers below 10's sum is: " + x);
System.out.println("------------------------------------");

x = 0;
for(int i =0; i <1000; i++)
{
if(i % 3 == 0 || i % 5 == 0)
{
x = x +i;
}

}

System.out.println("Nautral numbers below 1000's sum is: " + x);

}

}
 

keepemup

Banned
Joined
Jun 9, 2012
Messages
4,743
Reputation
-977
Daps
5,349
I'm developing asset system where my client can perform queries on, I'm use sqlite for local database, and my problem is that the data that the queries have to be perform on, are not normalized so it's difficult for me how to best approach this. I'm wondering should I add them all in one table and have nulls values for rows they have nothing in common?
I'd suggest doing exactly what you are thinking of. There are several ways to go about it; creating a table for each set of data or combining all sets of data into one and having some type of inf value for the irrelevant data.

The second is probably simpler to implement but that type of system will invariably be more inefficient than the first.
 

Type Username Here

Not a new member
Joined
Apr 30, 2012
Messages
16,368
Reputation
2,385
Daps
32,640
Reppin
humans
I'm developing asset system where my client can perform queries on, I'm use sqlite for local database, and my problem is that the data that the queries have to be perform on, are not normalized so it's difficult for me how to best approach this. I'm wondering should I add them all in one table and have nulls values for rows they have nothing in common?

Data modeling and design are so important for stability, efficiency, and scalability. Sacrificing proper data modeling is a huge mistake by developers who want to appease clients. A client trusts you to give him the most optimal solution in delivery, which at times means challenging the client. You have more experience than he does in the technically realm and it is your job to advise him/her when there is a better way.

I have a lot of experience in this area. PM if you want to talk further so you don't have to blast your data type or model in the public space.
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,291
Reputation
5,551
Daps
83,482
Now going through and taking my time to learn Java. C# shouldn't be too hard to pick up after that. Learning Java/C# will definitely help with my Typescript code since it looks a lot like C#/Java and I already understand JS.
 

Renkz

Superstar
Supporter
Joined
Jun 12, 2012
Messages
7,814
Reputation
2,310
Daps
18,031
Reppin
NULL
Now going through and taking my time to learn Java. C# shouldn't be too hard to pick up after that. Learning Java/C# will definitely help with my Typescript code since it looks a lot like C#/Java and I already understand JS.
I been rereading the thread, was wondering were you not a cs major and what programming languages are well verse in?
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,291
Reputation
5,551
Daps
83,482
I been rereading the thread, was wondering were you not a cs major and what programming languages are well verse in?

I actually got a degree in accounting. I picked up programming in my own time. My languages of choice right now are Javascript and Ruby. Going through Java right now. C# seems like a mix of Java and Javascript, so that won't be too difficult. After that, I plan on looking into Clojure.

I also plan on seriously stepping up my SQL and mathematics skills as well.
 

TrebleMan

Superstar
Joined
Jul 29, 2015
Messages
5,592
Reputation
1,180
Daps
17,540
Reppin
Los Angeles
For Javascript cats, I'm getting back into coding for real. Only took about a month off to clear my head.

If I want to go the object-oriented route, should I try to learn the .prototype convention or will it not be needed to use with ecma 6 style/standard for doing the same thing?
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,291
Reputation
5,551
Daps
83,482
For Javascript cats, I'm getting back into coding for real. Only took about a month off to clear my head.

If I want to go the object-oriented route, should I try to learn the .prototype convention or will it not be needed to use with ecma 6 style/standard for doing the same thing?

You should learn about prototypes so you know what is happening under the hood, but you will probably have to learn the classical method to learn more easily how to structure your code. ES6 classes is only syntactical sugar over the prototype system using the module/revealing module pattern.
 

Renkz

Superstar
Supporter
Joined
Jun 12, 2012
Messages
7,814
Reputation
2,310
Daps
18,031
Reppin
NULL
going through free boot camp curriculum, hopefully it gives me a solid foundation with the web languages, I really want to take a jab at their legacy code.
I heard from my professor that in 20 years that software developers may become irrelevant, how you guys feel about that:lupe:
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,291
Reputation
5,551
Daps
83,482
going through free boot camp curriculum, hopefully it gives me a solid foundation with the web languages, I really want to take a jab at their legacy code.
I heard from my professor that in 20 years that software developers may become irrelevant, how you guys feel about that:lupe:

I doubt that. Someone will have to generate the programs of the future. We can talk about some super easy programming language coming about that will let essentially anyone make something, but who is going to make that language? Who is going to maintain and add features to all of this new software? Someone has to write the programs to operate the hardware of tomorrow. Even if the languages of today are obsolete, you should have developed a thoroughly efficient enough grasp of logic that you'll be able to shift over to a similar field fairly easily. If you want to go deeper into programming, you'll have to study mathematics, and if you have a grasp of mathematics, you'll have a gateway into a ton of different fields.
 

Apollo Creed

Look at your face
Supporter
Joined
Feb 20, 2014
Messages
54,924
Reputation
13,202
Daps
206,806
Reppin
Handsome Boyz Ent
going through free boot camp curriculum, hopefully it gives me a solid foundation with the web languages, I really want to take a jab at their legacy code.
I heard from my professor that in 20 years that software developers may become irrelevant, how you guys feel about that:lupe:

There are BPM like Pega where Users can pretty much create their Use Cases/User Stories and the software will automatically generate the code. Programmers won't go ghost when it comes to Advance tasks/projects but most of the basic stuff will become more automated being that Outsourcing has caused too many quality issues.
 
Top