• Breaking News

    Tuesday, June 12, 2018

    The dream of working in a company that has good developers working on meaningful applications is actually possible? Ask Programming

    The dream of working in a company that has good developers working on meaningful applications is actually possible? Ask Programming


    The dream of working in a company that has good developers working on meaningful applications is actually possible?

    Posted: 12 Jun 2018 05:15 PM PDT

    I've been working as a developer for almost one year. In this time, I've learned a lot of things, got promoted and developed my social skills, but I am not really happy about my current routine: Fixing bugs in legacy applications.

    When I started to learn programming I was quite exited with the possibility of creating new solutions and working with inspiring people, but right now seeing so much bad written code in big applications makes me wonder if this industry is just filled with bad professinals who don't really want to make a difference.

    I mean... I just love to code, but I can't find my work meaningful while all I do is work in applications that all the users hate because of its obsolescence. I want to write code that helps people, that delivers an experience capable to save theirs time so it can be used in other important taks.

    I have no idea if fixing bugs from a terrible codebase is the standard life for a developer, I just know that this is no life for me.

    So, developers with more experince, those are my questions to you: Are there companies that are filled with actual good programmers working on meaningful applications? Are they the majority of dev companies? Is the job of fixing bugs and developing features the same thing for a developer and I am just getting it wrong?

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

    Best bang for your buck laptop/laptop qualities?

    Posted: 12 Jun 2018 08:24 PM PDT

    Going to start a CS program this fall, what laptop would be good? What kind of specs should I be looking for?

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

    Having a class method return an instance of that class in Python without the result replacing the object that you started with?

    Posted: 12 Jun 2018 06:37 PM PDT

    e.g. I'm trying to make vector addition for a class Vector (practicing for an exam):

    The important part:

    class Vector(list):

    def init(self,lst):

     self.contents = lst self.indices = range(1,len(lst)) self.dimen = len(lst) for i in range(len(lst)-1): if type(lst[i])!=int and type(lst[i])!=float: raise TypeError 

    def add(self,other):

     if (type(other)==type(self) and self.dimen==other.dimen): for i in range(0,self.dimen): self.contents[i]+=other.contents[i] else: raise ValueError return Vector(self.contents) 

    def sub(self,other):

     if (type(other)==type(self) and self.dimen==other.dimen): for i in range(self.dimen): self.contents[i]-=other.contents[i] else: raise ValueError return Vector(self.contents) 

    def mul(self,other):

     if (type(other)== int or type(other)==float): for i in range(self.dimen): self.contents[i]*=other elif (type(other)==type(self) and self.dimen==other.dimen): for i in range(self.dimen): self.contents[i]*=other.contents[i] else: raise AssertionError return Vector(self.contents) 

    def rmul(self,other):

     if (type(other)==int or type(other)==float): for i in range(self.dimen): self.contents[i]*=other elif (type(other)==type(self) and self.dimen==other.dimen): for i in range(self.dimen): self.contents[i]*=other.contents[i] else: raise AssertionError return Vector(self.contents) 

    The rest...

    def dim(self):

     return self.dimen 

    def getitem(self,i):

     if i>=1 and i<=self.dimen: return self.contents[i-1] else: raise IndexError 

    def setitem(self,i,x):

     if (i>=1 and i<=len(self.contents)): self.contents[i-1]=x else: raise IndexError 

    def repr(self):

     return "Vector("+str(self.contents)+")" 

    def eq(self,other):

     for i in range(self.dimen): if (self.contents[i]!=other.contents[i]): return False return True 

    The rest seems to work, but that detail specific causes me trouble.

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

    C - Why am I getting a warning?

    Posted: 12 Jun 2018 09:51 AM PDT

    I'm want to create a constant pointer to a constant string, like this: const char * const char ptr = "test";

    But gcc yields the following warning: " warning: initialization of 'const char * const*' from incompatible pointer type 'char * ", why is that?

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

    Software engineers: what do you actually do while at your job(s)?

    Posted: 12 Jun 2018 11:24 AM PDT

    Hi! I'm nearing the end of my high school career and wondering which branch of computer science to go into. Right now I'm leaning toward software engineering, but not sure what actual job possibilities that entails.

    Can some actual software engineers (or really anyone in the tech/compsci industry too!) comment about what you actually do on the job?

    Thanks!

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

    Summer read list

    Posted: 12 Jun 2018 12:38 PM PDT

    Hi!

    With summer coming up I think it would be nice if we all could give tips on what book you recommend reading (Related to programming). I will start with two books I have added to my summer-read list.

    • The pragmatic programmer - Andrew Hunt, David Thomas
    • Clean code - Robert Martin
    submitted by /u/muffa
    [link] [comments]

    How do I start a HTML programming portfolio?

    Posted: 12 Jun 2018 12:25 PM PDT

    I graduated in 2017 with a Computer Information systems BA degree. Since then, I've had some trouble finding jobs. I've recently decided I should try to get a portfolio started, to have work to show potential employers. Outside of the website/assignments I did for HTML class, I don't really have anything. Although, I don't think I could edit that site, as I don't quite remember the login information for it. I'm willing to do stuff, I'm just not sure where to get started. If this is in the wrong sub, please direct me to where I should post this, thanks.

    edit: Currently, I don't own a windows computer. I had to work on the school work at the school. So, in addition to my problem above, are there any good HTML writing applications you could suggest? Preferably for mac.

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

    System: Make object follow mouse cursor at a constant X speed

    Posted: 12 Jun 2018 04:06 PM PDT

    Hey, I need some help with this system (and sorry for the unorthodox request). I cant for the life of me figure out what series of calculations I need to perform to get the desired effect.

    I want to have an object follow the mouse cursor at the exact angle between the object and the cursor's coordinates, BUT always at a constant speed (say, 10 pixels/frame) regardless of direction.

    For example, if the mouse cursor is directly to the left of the object, I just have to increment the object's X coordinate by the Speed, each frame. (So, objectX += -speed; objectY += 0;)

    The issue is, whenever the angle between the object and the mouse cursor's coordinates is anything BUT "Right", I cannot figure out the correct "ratio" of X and Y coordinates to increment.

    For example, if the angle between the two coordinates is, say, 135º (cursor below and to the right of the object), I'd have to increment the object's X and Y by (10/4)SQRT(2) ~= 3.5; but what's a dynamic formula for every other angle? (ie 0...360)

    For reference, this is the same "control" system in some Bullet Hell shooter games, like Frantic 2.

    Please help, and thank you in advance.

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

    Export/building java project into any executable file.

    Posted: 12 Jun 2018 03:35 PM PDT

    I'm writing a discord bot in Java, and am working with Gradle. I want to export/build (not sure on terminology) this project into a file that I can double-click and have run (atm, I need to open my IDE and run it from there).

    Some have suggested I use ShadowJar, but for the life of me I can't figure it out.

    Any help/suggestions would be appreciated.

    If it matters, I'm using Intellij Ultimate.

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

    [C] fscanf question

    Posted: 12 Jun 2018 02:36 PM PDT

    I need to get informations from file in which every line contains

    String int int int

    So i use while(fscanf(dat, %s%d%d%d,....)==4)

    Now in one line there is a string and then four integers, but the loop doesn't stop, how can i check if in a file a line contains more arguments than it should?

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

    Please HELP me fix this code, I can't seem to get the ball to move.

    Posted: 12 Jun 2018 02:29 PM PDT

    This is the url for the code: https://codeshare.io/5gMEeN

    I for some reason can't seem to get the "ball1" to fall downwards, anyone able to help me?

    Thanks in advance!

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

    Reprogramming GPIO pins for Raspberry Pi

    Posted: 12 Jun 2018 01:52 PM PDT

    I have a raspberry pi 3 b+ with a waveshare 3.5" LCD screen that's running pihole. Well the pi has been gradually getting hotter lately so I've been looking into getting a fan installed on the pi. The problem is that the LCD screen uses most of the GPIO pins including one that supplies 5V. Well the fan would also need to use the 5V pin. I have 2 rows of 7 pins free that the screen isn't using. However most of them are ground pins only. Is there a way to reprogram one of the unused GPIO pins so that it also supplies 5V? I have a little experience in an embedded systems class but all we did was turn pins on and off. I found this on google but not sure if it can be useful:

    https://makezine.com/projects/tutorial-raspberry-pi-gpio-pins-and-python/

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

    Database and website writing from C++. What is the best practice?

    Posted: 12 Jun 2018 08:27 AM PDT

    I have a local linux C++ TCP server that receives device information (temperature) from 20 devices every 60 seconds. I want to be able to access this information online through a webpage. I have never done any web work and was wondering which technology or platform to use. I looked into Google firebase, but it seems like that may end up being too expensive with the amount of queries I will be making.

    Is there an easier or better solution that allows me to write to an online database using C++? Maybe writing to an Azure SQL database and then accessing it through one of their webapps? Does this seem to pose potential conflict issues?

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

    Python Argument Mis-match

    Posted: 12 Jun 2018 11:29 AM PDT

    Going to show some of my code in a simpler form to illustrate my error: I am using multiprocessing library and option parser in python.

    parser.add_option("-p", "--destIp", action="store", type="string", dest = "destIp", default = "192.168.0.1") destThread = multiprocessing.Process(name='one', target=destTest, args=(options.destIp)) def destTest(destIp): 

    Those are the three parts. I get an error: destTest takes 1 argument, 12 given. now there are 12 'digits' in the default IP address. why is this giving me this error?

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

    Script for trending news headlines/keywords

    Posted: 12 Jun 2018 09:36 AM PDT

    Does anyone know of any public/open source scripts for compiling lists of popular news keywords? Trying to find an automated way of doing this for a project I am working on.

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

    How to make a horizontal line segment detection algorithm(Java)?

    Posted: 12 Jun 2018 09:33 AM PDT

    I'm seeking advice on where to find (or how to make) an algorithm which can detect horizontal lines in an image. These horizontal lines can have some variance, so any line oriented between 175 to 185 degrees would be detected.

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

    Looking for guidance on creating a script that will take specific files from my Outlook email, create a folder in the right location which is based on the attachment file name, and save the files there. Where could I get guidance on how to do this?

    Posted: 12 Jun 2018 05:05 AM PDT

    Help with Data Entry automation in AX

    Posted: 12 Jun 2018 08:49 AM PDT

    Hi all, I'm currently working an internship where I'm doing a considerable amount of data entry manually and it can be a little mind numbing so I was hoping to design a program that can automate the process for me. Basically, I'm working through entries on an excel spreadsheet to filter search for specific items in my company's AX2012 database, and then update their missing product information using context clues (ie what this small item eventually gets built into or what the most recent order that related to this item was for). I was thinking the program could read entries from the excel doc and then search the item entries in AX for keywords and update the product information itself. Would this be possible? I've done a little research and the programming language X++ is something that keeps coming up, would I use that? I have a little experience programming in Java and C++, but this would be my first time designing a program around a specific application like this

    Thanks for any help in advance!

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

    Program skipping cin >>

    Posted: 12 Jun 2018 02:28 AM PDT

    Hello guys im having a problem with this program:

    #include <iostream> using namespace std; int main() { int price, screen,weight,rating; cout << "Enter the price: "; cin >> price; cout << "Enter the screen size: "; cin >> screen; cout <<"Enter the weight: "; cin >> weight; cout<<endl; if (price < 1500 && screen >= 4 && weight <200) cout << "5 stars"; else if (price < 1500 && screen >= 4 && weight >=200) cout << "4 stars"; else if (price >=1500 && screen >= 4 && weight <200) cout << "3 stars"; else if (price < 1500 && screen < 4 && weight <200) cout <<"2 stars"; else cout <<"0 stars"; return 0; } 

    The thing that happens is the program skips the "cin >> weight" why does this happen? if I put cin >>weight as the first one (before cin>> price) it works fine but when its like this it doesnt work, why?

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

    Looking for help starting a program that searches a website / database for keywords and saves relevant information

    Posted: 12 Jun 2018 05:22 AM PDT

    I have some background in programming, was wondering where to start to learn something like that, what kind of languages I need to know, if there are any milestones I should aim for to break it down into smaller pieces, etc.

    I figured there's probably a common way, languages suited to the job, a lot of interfacing between languages. Looking for a little bit of direction

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

    How to handle files from a list?

    Posted: 12 Jun 2018 12:13 AM PDT

    Hello,

    I have been working on a project to categorize and sort a massive mess of files.

    I have used a program to run through the files and search for certain string matches.

    First, it creates an output file:

    FullOutput.txt 

    In this file, it lists all files, which match and which do not.

    It appends :1 for a match It appends :0 for a non-match 

    Example:

    C:\Users\strugglingtodomybest\Sorting\Input\X1234-5678\4321A1-A2.dwg:1 C:\Users\strugglingtodomybest\Sorting\Input\X1234-5678\4321B1-B2.dwg:0 

    ----

    Where I need help:

    Now, I am struggling to make things happen once I have this critical information.

    Because of how it output, I need to sort the files based on if there is a :1 or a :0 at the end.

    If :1 then create a file:

    C:\Users\strugglingtodomybest\Sorting\Output\Matched.txt 

    (Any string that has the :1 at the end goes into this file. With the :1 stripped away.)

    If :0 then create a file:

    C:\Users\strugglingtodomybest\Sorting\Output\NON\_Matched.txt 

    (Any string that has the :0 at the end goes into this file. With the :0 stripped away.)

    ----

    Where it's going afterwards:

    The idea will be, I can then script it like this:

    Any file which matched, is now in a list. With a clean name (no :1 appended).

    C:\Users\strugglingtodomybest\Sorting\Output\Matched.txt 

    Then this list can be processed.. that any file in this list is moved to a new directory.

    C:\Users\strugglingtodomybest\Sorting\Input\X1234\-5678\4321A1\-A2.dwg 

    Would then move to:

    C:\Users\strugglingtodomybest\Sorting\Input\X1234\-5678\Matched\4321A1\-A2.dwg 

    Any file which DID NOT matched, is now in a list. With a clean name (no :0 appended).

    C:\Users\strugglingtodomybest\Sorting\Output\NON\_Matched.txt 

    Then this list can be processed.. that any file in this list is moved to a new directory:

    C:\Users\strugglingtodomybest\Sorting\Input\X1234\-5678\4321B1\-B2.dwg 

    Would then move to:

    C:\Users\strugglingtodomybest\Sorting\Input\X1234\-5678\Non\_Matched\4321B1\-B2.dwg 

    Help? I think it's probably not that hard, but I keep chasing my own tail.

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

    No comments:

    Post a Comment