• Breaking News

    Monday, July 15, 2019

    Do I need to learn front end development if i want to just do backend stuff? learn programming

    Do I need to learn front end development if i want to just do backend stuff? learn programming


    Do I need to learn front end development if i want to just do backend stuff?

    Posted: 15 Jul 2019 03:04 PM PDT

    I guess the title is pretty clear. I'm looking into programming to change careers. I more interested in the technical part rather than the design stuff. Like would learning python be good enough for me to get a back end job with?
    Thanks

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

    Is it worthwhile to start out learning SQL?

    Posted: 15 Jul 2019 06:54 PM PDT

    I started the khanacademy SQL course the other day at the suggestion of a friend and I have been really enjoying it.

    Is it detrimental to learn a domain-specific language first?

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

    ELI5: what is a framework and what’s the difference between a framework and a web framework.

    Posted: 15 Jul 2019 07:12 PM PDT

    I don't know If i have the right analogy but would considering a house structure (eg: the wood columns) as the framework and the code you add on top of it is the rest of that house (Windows, doors, walls etc) be correct?

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

    Coding While Tired: Does this happen to you guys?

    Posted: 15 Jul 2019 01:47 AM PDT

    For me there comes a point where if I ignore background tiredness about 70% of it goes away, or so I think. Yesterday I couldn't understand why half of my PHP function worked and half did not. The console error looked untraceable. Today immediately upon waking I checked what Chrome had rendered using "View Source" without a second thought, saw I was trying to key a json object using comma separators instead of colons, and suddenly the function worked.

    CWT past that initial warning phase may feel "ok." But as this example summed up, boy does performance fall off a cliff. This has been fairly consistent for me and I wonder what causes it.

    Have you guys found the same? Is it better to just sleep and wake up than keep pushing to complete some feature you're almost close to finished with?

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

    What is the most useful intermediate software developer advice you have?

    Posted: 15 Jul 2019 05:09 PM PDT

    By "intermediate" I mean someone who's more or less mastered coding but hasn't mastered the art of designing software yet.

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

    Creating a website while learning web development

    Posted: 15 Jul 2019 01:43 PM PDT

    I just finished my first book on html. However all I did was read the book and go through the exercises. After I finished I found out by the person who recommended the book I should have been building a website right as I went.

    So my question is what is the best way to do this? The problem I found is your ideas for what you want to do in the website may take a while before you get to the answer in the book. Also there is info in the book you dont need on your site.

    1. Should you follow the book step by step and try to implement each piece of info on your site even if you dont need or want it for practice sake?
    2. Should you skip around in the book to find information your next problem for your site, even if the book builds on top of each other step by step.
    3. Should you try to build a website that would be while basic, something close to what you would be doing as an actual web developer if you got a job. Or should you build something your interested in for fun?
    submitted by /u/redditacct16
    [link] [comments]

    It saddens me that I couldn't get an internship this summer :(

    Posted: 15 Jul 2019 08:25 PM PDT

    I have fantastic grades, but I'm a freshman and when applying to jobs I didn't have any projects to showcase. Now I'm stuck doing data entry 8 hours a day then going to tutor math for middleschoolers for another hour and driving 2 hours as well. I come home and want to code, but my mind is simply zapped and it saddens me that I'm too tired to lift up the book and learn. I guess I'll have to wait for the school year and grind harder than I can imagine.

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

    Foreign Key [HELP]

    Posted: 15 Jul 2019 07:20 PM PDT

    So I have my pthon file connection to a mysql database, I have the database created, tables created. Sorted. I have my PRIMARY KEY in my first table (student_id). I then have a PRIMARY KEY in my second table (question_id), I also have a FOREIGN KEY in the second table (student_id).

    Here is my code for the second table:

    https://pastebin.com/raw/7fKNwpXg

    The following are the errors im getting:

    mysql.connector.errors.DatabaseError: 1364 (HY000): Field 'studentID' doesn't have a default value

    The default value should be the PK from table one?

    Can anyone help me with this?

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

    [Offering] mentoring

    Posted: 15 Jul 2019 06:01 AM PDT

    Hi. I'm 28 y.o. backend software developer. I've been learning English for a couple of years and I'm around B2 level now. But I lack a speaking practice. So we could help each other. I'm looking for a native English speaker. We will discuss about programming in English and I will teach you how to write code if you want. Feel free to PM me.

    Alex.

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

    Should one learn to solve their own bugs when still a beginner /intermediate ?

    Posted: 15 Jul 2019 12:25 PM PDT

    So today i had a bug and was very frustrated since i couldn't fix it for a moment, usually i just post my code for other people to hand me the solution, however today i decided to challenge myself and just fix it myself. I did after like an hour or so, got a great feeling of satisfaction but at the same time it kept me feeling like i wasted a lot of time for something very simple !

    So is this useful for the learning process or just a waste of time ?

    thanks

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

    [C++] Can anybody explain what is "const" doing in this class definition?

    Posted: 15 Jul 2019 08:26 PM PDT

    I have the following code:

    #include <string> class Person { public: std::string m_name; int m_age; Person(std::string name = "", int age = 0) : m_name(name), m_age(age) { } std::string getName() const { return m_name; } //what is const? int getAge() const { return m_age; } //what is const? 

    };

    Can anyone explain what is the purpose of const in this class declaration? The only thing I know CONST is used for is attaching a fixed value to a variable. Not sure what "const" is doing exactly here.

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

    How to merge two elements of two different arrays in JS?

    Posted: 15 Jul 2019 11:19 PM PDT

    I want my output something like this:

    Desired Output: Machine Learning Artificial Intelligence 

    For example I have two arrays like below

    var arrayOne = ['Machine', 'Artificial'] var arrayTwo = ['Learning', 'Intelligence'] 

    How can I concatenate the elements of the arrays?

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

    What's the most unexpected way a client has used a program you've made?

    Posted: 15 Jul 2019 11:37 AM PDT

    I know the common practice of throwing everything including the kitchen sink at software and features in it so it's robust but I'd like to hear some real life examples of users doing very unexpected things that lead to this mentality.

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

    [Database][MongoDB][Query Help] Help with $filter operator in Aggregation Query

    Posted: 15 Jul 2019 06:40 PM PDT

    I hope it's okay to ask a question related to writing a query in MongoDB.

    Background:

    The problem I am asking about is just an example to represent the issue I am having. The actual documents are much bigger and complex, but I should be able to apply the same concept.

    I'm fairly new to MongoDB, and just now getting into writing Aggregation queries on a regular basis.

    The actual question is all the way at the bottom in bold and quote...

    Example:

    Assume I have the following ->

    (100% made this up on the spot, so bear with me if the example is lame lol)

    Collection: CustomerLogin { _id: 0, processingDate: 2019-07-01, customerID: 22, location: France} { _id: 1, processingDate: 2019-07-02, customerID: 22, location: France} { _id: 2, processingDate: 2019-07-02, customerID: 23, location: USA} // ...and a bunch more... Collection: Sale { _id: 0, processingDate: 2019-07-01, customerID: 22, items: [ { item_id: 43, quantity: 2, price: 10 }, { item_id: 2, quantity: 1, price: 240 } ] } { _id: 1, processingDate: 2019-07-02, customerID: 22, items: [ { item_id: 77, quantity: 1, price: 50 }] } { _id: 2, processingDate: 2019-07-02, customerID: 23, items: [ { item_id: 50, quantity: 6, price: 10 }] } // ...and a bunch more... 

    Problem:

    I want to produce a Query that will give me the transactions. For the purposes of this example, we'll assume a transaction is the customer logging on and making a sale. Thus, he'll have an entry in CustomerLogin and Sale. I want it to return customerID, processingDate, location, items. Each customerID/processingDate as a new document. As an example, for customer 22, I'd want to see:

    {customerID: 22, processingDate: 2019-07-01,location: France, items: [ { item_id: 43, quantity: 2, price: 10 }, { item_id: 2, quantity: 1, price: 240 } ]} {customerID: 22, processingDate: 2019-07-02,location: France, items: [ { item_id: 77, quantity: 1, price: 50 }]} 

    To write this query I would do an aggregate of CustomerLogin and a lookup on Sale. Something like:

     db.CustomerLogin.aggregate([ { $lookup: { from: "Sale", localField: "customerID", foreignField: "customerID", as: "sales" } } ]) 

    As written, this would not quite give me what I'm looking for, as each CustomerLogin would be "joined" to each Sale, and thus I'd end up with an array of sales within the result. I've been reading about $filter, and think this is where it would come into the picture. $filter within a $project allows you to specify/filter specific entries within the array to return. So, can you filter using fields from both the aggregation and the $lookup? Something like this:

     $project: { sales: { $filter: { input: "$sales", as: "sale", cond: { $eq: [ "$$sale.processingDate", "processingDate"] } } } } 

    In the above, what I am thinking is check that the processingDate from Sale and the processingDate from CustomerLogin are the same, essentially ensuring I'll only have the entry in the sales array that matches to the same date as the CustomerLogin entry. Does this work in MongoDB?

    (I would then go on to project the specific fields I am looking for, but that's obvious and not really at the heart of the question, so omitting that)

    I would give this a try myself, but I left my work laptop at work, and thus stuck thinking about it until tomorrow :)

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

    What's the most useful principle you've ever learned in programming?

    Posted: 15 Jul 2019 02:11 AM PDT

    Trying to formulate a list of principles in programming

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

    Lempel Ziv Complexity

    Posted: 15 Jul 2019 07:16 PM PDT

    Hi everyone,
    I made a video explaining how an algorithm that looks complex work and where it come from. I used to struggle with understanding some more math-y algorithm in the past, especially by looking at the pseudo, and using them always felt like magic.
    Now that I'm a bit more experienced I figured out a way to understand most algorithm:

    1. First the context is really important of why this algorithm was made, as the algorithm were never really made in a vacuum.
    2. Second, taking the pseudo-code and implementing it for real usually do the trick to finally click and understand it.

    Here is the link if you are interested: https://youtu.be/INO1jhZ_PQY

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

    Learning Python, looking for friends or even a group to learn together!

    Posted: 15 Jul 2019 11:09 AM PDT

    Hello to whoever is reading this, as you see I am currently learning programming more specifically Python as my first language since it intrigues me. I've been learning on and off for a while as school and life can get in the way and know the basics. However, once I get into trying to learn I find myself lost or bored, as I sometimes think I have a short attention span. Lol.

    So, as it reads I'm looking for a friend or even a group dedicating to learning Python. I have 1 other friend who is also interested in this and we believe the bigger the group the better we all learn. Our idea is to learn at the same pace, whether book, or Udemy, it doesn't matter as long as we learn. I guess in some way I am also looking for long-term friends, but it doesn't have to go that route. Were taking this seriously as one day I do hope on becoming a software developer, so yeah lol. If this sounds interesting and you're also looking for friends or to learn feel free to PM me! I'm located in the U.S specifically CA so time zones matching would be a good thing, since stuff and schedules can get hectic with people in different time zones. So yeah hope to hear from some of you!

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

    Getting a job based on internship experience?

    Posted: 15 Jul 2019 08:25 PM PDT

    I am currently in school and I have had two summer internships with a very big and reputable tech company in the NYC area. During the school year I continue to work part time remotely. Things have gone really well and I've excelled at the projects given each year according to the team, which is genuine developer work that will be maintained by the main team after the summer. I am essentially working as the team lead for this year's project due to my returning status and knowledge of how to handle the project.

    I am absolutely sure I am employable today at this point. I'm confident in my skills with learning on the fly, working with new teams, Agile, etc. Unfortunately, based on my credits I have almost 2 years of school left. I would love to simply start working now. It would be a big saver of time and money. Is it possible to leverage this experience to start working now?

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

    [Mentoring] Nibble Fiddle: A Python Program Competition

    Posted: 15 Jul 2019 08:06 PM PDT

    I have a fairly simple script to write that I could knock out in perl in an hour but I thought I'd throw it up here for newbies to get a taste of an actual work assignment and I figure no one else wants to do it in perl so python it is. It struck me as simple enough that it was a good example/assignment for fledging programmers to tackle.

    Let's make it a competition; the winner will be judged by me/the-community based on two three criteria:

    1. Functionally correct
    2. Clarity of code
    3. Minimal code

    Functionally correct: The code must satisfy the requirements given below.
    Clarity of code: Accuracy and meaningfulness of variable and function naming. Control-flow is easy to follow (no excessive sub-functions; no excessive nesting of loops) Comments are succint and informative not redundant nor verbose.
    Minimal code: Less code to get the same work done is (generally) better code that better leverages system/available libraries (e.g. Using builtins/system functions for string manipulation and conversion is better than writting your own loops.)

    I can even give out a prize in the form of a Steam game I have left over in my inventory that none of my friends want.
    Choice of {Rise of Nations, Robot Roller-Derby Disco Dodge Ball, Cannon Brawl, Dungeons of the Endless (I actually really like this one but it's not popular), Orion: Prelude (formerly know as Dino Horde, Hours-Played/$1 Cost this is the most valuable game I own)}

    I guess the rules are that you cannot offer rewards. So ... YOU GET NOTHING. GOOD DAY SIR.
    I won't get to this for a day or two but I'll check back then and post my code and we can compare notes.

    Project Nibble Fiddle (NF) Requirements

    Functional Requirements

    Req. Id Description
    NIB-FUN-001 NF shall require one parameter; a 32-bit hexidecimal address.
    NIB-FUN-002 NF shall process data from stdin to stdout by default
    NIB-FUN-003 NF shall accept -i and/or -o as parameter options to specify input file and output file respectively
    The input and output streams will be in the S-record format
    NIB-FUN-004 NF shall return 0 upon successful completion and 1 or higher upon error
    NIB-FUN-005 NF shall print basic usage instructions if no parameters are given (and return error)
    e.g. ./nibbfidd <address offset> [-i input_file] [-o output_file]
    NIB-FUN-006 NF shall adjust the address of S3 (32b) records by the given address offset
    NIB-FUN-007 NF shall return error if the checksum of a S3 data record is invalid and print diagnostic info to stderr
    NIB-FUN-008 NF shall update the checksum at the end of the each s-record it manipulates per spec

    Valid invocation examples:

    ./nibbfidd 0x10000000 -i app.s37 -o app_for_flash.s37 # Reads app.s37, writes to app_for_flash.s37 ./nibbfidd 0x20000000 -i app.s37 # Will print to screen ./nibbfidd 0x30000000 # Reads stdin til EOF and outputs to stdout 

    Environment Requirements

    Req. Id Description
    NIB-ENV-001 NF shall execute under Windows 10
    NIB-ENV-002 NF shall execute under GNU/Linux
    NIB-ENV-003 NF shall execute under the python 3 interpreter

    Licensing Requirements

    Req. Id Description
    NIB-LIC-001 NF subbmissions shall use an open-source license of the author's choice

    Documentation Requirements

    Req. Id Description
    NIB-DOC-001 List of prerequisites install

    e.g. If you use pip packages I need to know which ones to install (unless you go nutz and make it installable from pypi/pip)

    Non-Functional Requirements is a Dysfunctional Term

    Just a soap-box PSA in recognition of Len Bass

    Example Data

    Example Input

    S00600004844521B S3090009000000494588D7 S34500092EC09600CC00FFCF50109600CC02FFFC50029602CC02FFCF501096021A0700C0761F0114CC0CFFCF5020960C1A0C0003CC0CFFF35008960C1A0C0400CC0CFF3F504056 S30D00090010B00EBABA00000000A7 S7050009458824 

    Example Output for offset 0x00100000

    S00600004844521B S3090019000000494588C7 S34500192EC09600CC00FFCF50109600CC02FFFC50029602CC02FFCF501096021A0700C0761F0114CC0CFFCF5020960C1A0C0003CC0CFFF35008960C1A0C0400CC0CFF3F504046 S30D00190010B00EBABA00000000B7 S7050009458824 

    PS My new favorite magic-dword is 0xBABAB00E

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

    Should input be validated AND processed in the same method?

    Posted: 15 Jul 2019 11:49 PM PDT

    Sometimes you need to make sure input comes in a valid format. What I wonder is - should you validate the input in a separate validateInput() method that is called from the processInput() method, or should you include the validation code within the processInput() method.

    An example is ISBN numbers. They can come in 10 and 13 digit forms but for brevity lets focus on the 13 digit form that does NOT include characters. Here is an example of a method that does both validation and processing:

    private boolean check13DigitISBN(String isbn) { int sum = 0; //Multiply even numbers with 1, uneven numbers with 3. Sum all the numbers you get. for(int i = 0; i < 12; i++) { if(!Character.isDigit(isbn.charAt(i))) throw new NumberFormatException("ISBN must only contain digits"); int num = Character.getNumericValue(isbn.charAt(i)); if (i % 2 == 0) { sum += num; } else { sum += num * 3; } } //Last steps of processing ISBN's, removed for brevity } 

    Or like that:

    private boolean validateInput(String isbn) { for(int i = 0; i < 13; i++) { if(!Character.isDigit(isbn.charAt(i))) { return false; } } return true; } private boolean check13DigitISBN(String isbn) { if(!validateInput(isbn)) throw new NumberFormatException("ISBN must only contain digits"); int sum = 0; //Multiply even numbers with 1, uneven numbers with 3. Sum all the numbers you get. for(int i = 0; i < 12; i++) { int num = Character.getNumericValue(isbn.charAt(i)); if (i % 2 == 0) { sum += num; } else { sum += num * 3; } } //Last steps of processing ISBN's, removed for brevity } 

    Or should you do that:

    public boolean processISBN(String isbn) { if(validateInput(isbn)) { return processISBN(isbn); } return false; } 

    What style better fulfills the best practice of single responsibility and logic decoupling?

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

    Functions in Python

    Posted: 15 Jul 2019 02:47 PM PDT

    so here I defined my functions but i get a "list index out of range" error. this is my code where the error occurs (marked with ***). how can i fix this? The question im solving is here: https://imgur.com/a/OClY17L

    def calculateStdDev(data, mean): stdDev = [] sumSquaredDiffs = [] for vals in range(len(data)): for num in range(len(data[vals])): ***sumSquaredDiffs[vals] += (data[vals][num] - mean[vals])**2 for std in len(data): stdDev[std] = sqrt( sumSquaredDiffs[std] / len(data[std])) return stdDev 
    submitted by /u/arkum645
    [link] [comments]

    Any offline alternative to draw.io?

    Posted: 15 Jul 2019 10:54 PM PDT

    Hi everyone!

    I am supposed to create this database relationship diagram using the online tool draw.io

    Actually I am already given a template to fill and connect. But it is not very convenient for me to use the online version. I am hoping for any offline software that helps me create the diagram and also compatible with draw.io

    Thanks again!

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

    Anyone have a SoundCloud dev account?

    Posted: 15 Jul 2019 10:53 PM PDT

    So I wanted to start using the Soundcloud API for OAuth for a project but they're no longer accepting new app registrations. Does anyone have one that I could use?

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

    What does it mean "Test business logic, not methods"?

    Posted: 15 Jul 2019 10:39 PM PDT

    Why did my udemy course instructor on TDD say that? Aren't the methods the business logic?

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

    No comments:

    Post a Comment