• Breaking News

    Saturday, February 16, 2019

    As a professional programmer, how many hours a week do you dedicate to improve your technique? Ask Programming

    As a professional programmer, how many hours a week do you dedicate to improve your technique? Ask Programming


    As a professional programmer, how many hours a week do you dedicate to improve your technique?

    Posted: 16 Feb 2019 11:55 AM PST

    I'm reading Uncle Bob's Clean Coder and I'm loving it.

    In the book he says that a professional developer must work around 60 to 70 hours per week. 40 hours for his job, the rest of the time to improve his skills.

    More specifically, he says that a developer should dedicate 3 hours of his day (weekends included) to study. This includes reading books about programming, trying new things, side projects, etc... Things out of your comfort zone.

    What do you think about this? I'm struggling to study 1 hour after work!

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

    Ive been looking to build some service's using USSD i can't find any resources online any tips and guidance would be appreciated

    Posted: 16 Feb 2019 09:22 PM PST

    Anybody else think SAFe is a scam?

    Posted: 16 Feb 2019 09:02 PM PST

    I finished company required SAFe training recently, and I came away thinking that this was a system designed to allow big corporations to merely check the Agile checkbox. It had a "timeshare salesmanship" vibe to it. That the SAFe guys know agile is the "in" buzzword, but that many large corporations were not willing to stomach true agile. So they tailor made a spin-off of that has aspects of agile, but is really designed to appease corporate doubters. Are their "products" anything more than certifications and annual re-ups? (aka CYAs to high level managers who need to be able to claim they are agile?)

    From the class, SAFe's brand of agile seemed to be nothing more than a mix of common sense plus agile lipstick applied to a waterfall pig. My employer, for example, has no plans on giving up their monster MS-project schedules that span multiple years, despite being "full in" on agile. They just make up user stories from their pre-existing schedules.

    Am I wrong? Being too much of a negative Nancy?

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

    ELI5: Distinguishing between Machine Learning disciplines.

    Posted: 16 Feb 2019 04:43 PM PST

    Hello all. I have zero background in the field of programming/ML, so I would really appreciate if someone could ELI5 - and real-life examples would be ideal!

    What is the difference between a Machine Learning Scientist, Machine Learning Engineer, and Software Engineer - Machine Learning? These are generally the different job titles I come across and I don't understand what each does.

    Thank you!

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

    OOP design: for multiple similar “types” of something (e.g. big/medium/small ships), should you do inheritance or a simple check in one class?

    Posted: 16 Feb 2019 06:29 PM PST

    What I mean from the title is that either I create separate classes for each "type" that extends from a parent class Ship, or just have an all-encompassing Ship class that checks whether it's a big/medium/small ship in the constructor method and set the instance variables accordingly.

    The difference between them is actually not that much, just on capacity and maintenance time. Everything else is the same.

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

    Rebuilding project from Jquery heavy to something cleaner

    Posted: 16 Feb 2019 09:46 PM PST

    Hello,

    I've built a single page tool for my team (operations and api support for my company). Front end that presents, formats, highlights data from a bunch of sources. Highlights things that may be bad, order histories, customer attributes, etc. I made modular containers that can move, close, popout, things like that.

    Built in node, js HTML and CSS served staticly with express. It communicates client to sever through socket-io authorized by jwt. Server runs AD authentication, pulls data from databases and APIs and passed it to the clients.

    With jqery, the front is definitely spaghetti. That seems to be the nature of jQuery. I've been looking at react, angular, vue, meteor and a few others to see what I can do. I have the time and interest to do whatever is best.

    I'm mostly interested in react. I worked through the react tutorial, but it was more about what react can do and the syntax of it. I feel like it is going to be a complete overhaul reusing bits of code, which is fine. The tutorial didn't really deal with the server side of things and what it takes to put together with your other peices. I used npx in the example to generate the server.

    Another consideration is that it like the team I work with, notb string developers, to be able to comfortably look around and modify it in the future if they need to. I'm interested to hear any opinions on libraries or frameworks that will work for me. Even apart from react. Also good tutorials.

    I'll be looking around more myself and update my post if I find anything particularly good.

    Thanks

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

    Can someone explain the purpose of dynamic memory allocation vs just using an array?

    Posted: 16 Feb 2019 09:16 PM PST

    I have this code for example:

    int main1() { char arr[] = "abc\n"; printf("%s", arr); } int main2() { char* arr = malloc(5 * sizeof(*arr)); arr[0] = 'a'; arr[1] = 'b'; arr[2] = 'c'; arr[3] = '\n'; arr[4] = '\0'; printf("%s", arr); } 

    All I know so far about dynamic memory allocation is that arrays use the stack whereas malloc allocates memory on the heap. Why is the difference between the stack and the heap important? What do they do differently? And if they are similar, why would I ever use malloc() if creating an array is much shorter? Thanks in advance for any explanations.

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

    Problems with a matrix

    Posted: 16 Feb 2019 04:04 PM PST

    Hello guys, this is my first post so if I do anything wrong let me know and do go really hard on me.

    Ok, here is the problem, I have to do a algortihm that is is able to generate a random matrix (n x m) that only has 0's and 1's. Let's say the user enters n=5 and m=6, so n x m=30, then I take the 10%, that is 3, so the program randomly enters three 1's.

    Here is the trick, when all number 1 finished entering into the matrix, the program has to verify if there is a connection or a path between the top and bottom of the matrix, and then left to right, it kind of North to South and West to East paths. If there is no connection, the algorithm will have to another three 1's and check if the path is now formed, it will have to do it until both paths have been completed.

    The path must be only formed by number 1's, and they have to next to each other, they can up, down, left, right and even in diagonal.

    This is the part that I don't really know how to do it, I am not a master in Java and my professor is kinda harsh. I am seeking for advice, any help is well received!

    Thank you for reading my post

    edit: added a condition of the algorithm

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

    Tic Tac Toe reporting win & tie + using array functions

    Posted: 16 Feb 2019 02:51 PM PST

    I am currently working on how to display wins, and ties, however, I have been working on this for hours and have made no progress. I would rather NOT use long if-else statements. I would like to implement 2 array functions and 2 of the following: forEach(), every(), some(), includes(), filter(), map().

    I am new to JavaScript. I would really appreciate any help I don't know what to do.

    I have uploaded my code on here:

    https://jsbin.com/milipukala/1/edit?html,js,output

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

    What is the complexity of this code(Big O notation)?

    Posted: 16 Feb 2019 08:27 AM PST

    for(int i=0;i<a;i++) //Code

    for(int i=0;i<b;i++) { for(int j=0;j<c;j++) //Code }

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

    Open Source Chatbot

    Posted: 16 Feb 2019 02:47 PM PST

    I'm looking for an open source chatbot platform that 1) doesn't require me to connect to Facebook, Telegram, or any other app and 3) doesn't require me to code.

    This is what I am currently using: https://chatfuel.com/

    Problem with this is that it's slow and doesn't seem to like it when I have to make changes in the text, images, etc.

    I also found: https://www.engati.com/. It's better but I still have to connect to Facebook in order to use it.

    Thanks for your help!

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

    How to create an idempotent function that leverages calls to a REST API?

    Posted: 16 Feb 2019 02:39 PM PST

    I'm new to the world of REST APIs and I'm interested to understand, in general, the most efficient way to create a function that creates and objects if it doesn't exist, and if it already exists, update it.

    To make what I'm trying to achieve more concrete, I'll describe what I'm trying to do via the Ansible Tower REST API:

    I want to create a script that: 1. Takes as input a definition of an Ansible Tower Project. 1. Create the Project if it does not already exist. 1. If it already exists, then update it to match the specification described by the input.

    To achieve this it seems I could write a script with the following logic:

    $project = GET /api/v2/projects?name=$projectName&organization=$organizationId # A project name must be unique within the same organization if (the $project doesn't exist){ POST /api/v2/projects/ # Create the project } else { PUT /api/v2/projects/$project.id/ # Update the project to match the specification provided }

    Is this approach how this behavior is generally achieved when interacting with REST APIs, or is there a better approach?

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

    What is your motivation for contributing to open source projects?

    Posted: 16 Feb 2019 10:25 AM PST

    I am very grateful for open source projects, but they seem inconsistent with prevailing economic theory, so I wanted to know - what's your motivation?

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

    What to use to create a social network with strong customization

    Posted: 16 Feb 2019 01:03 PM PST

    The question is, how would you solve this problem to create a decent product, with little money.

    In detail:

    A client asks me to write some sort of social network clone

    lets say, a social network clone about books

    You should be able to:

    You can write a blog about the book, how to write books, how to write

    You can recommend books / e.g. some book guide

    You create discussion about book genres and writing

    There are events about books, writing etc in a calendar

    You can socialize using common interests with other users

    There should be some "book finder" that helps you find the next book to read.

    Now he told me to use wordpress, but personally, I think thats a horrible idea.

    Wordpress does have some plugins, but they are buggy, and things will fall apart really quickly imho.

    thats my opinion though. I personally would use laravel to create these elements in a minimal fashion.

    The client doesn't want to spend "much" money. Whatever that is. And he thinks wordpress will save him money. I think the opposite. I do have experience with laravel and wordpress...

    what are you guys thoughts about approaching this?

    All subjective thoughts, feedback, experiences etc more than welcome!

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

    Is using Docker to keep PC lean worth It?

    Posted: 16 Feb 2019 12:25 PM PST

    Hey everyone,

    I do a lot of studying on my own time to maintain relevancy in this ever-changing world. Part of that is educating myself on different databases and tools that are out there. This means installing new services, dependencies, etc... I recently looked into Docker and realized how helpful of a tool this is.

    I do all of this extra work on my PC; which I also use to play games and surf the web with. With PC performance in mind, is it worth it to reformat and re-install different databases in Docker containers to keep my PC cleaner? Has anyone here done this before with noticeable improvement?

    Thanks ahead of time.

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

    My array has all the right elements, but printing it out as a string makes it print random symbols

    Posted: 16 Feb 2019 12:12 PM PST

    My objectives:

    • Generate and print 10 random uppercase letters
    • Put the 10 characters into array "gg[50]"

    The top for loop seems to be doing what it's doing. It generates the 10 letters and puts them into the character array.

    My attempt at trying to print the string fails miserably. I thought maybe I just didn't put it into the array properly.

    I set up the 2nd for loop and printed the array out element by element, and it prints out properly. Why does my array NOT print out correctly?

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

    How do i retrieve just the child-object in Azure Cosmos?

    Posted: 16 Feb 2019 03:40 AM PST

    I am using Azure cosmos db with the Mongodb API. Also i am using mongoose to create schemas and create new documents in the database. I am also using Node.js.

    At this point i am considering using a One-to-Many relationship with embedded doucements.

    The datastructure is like this :

    { "_id" : "locality1", "_type" : "Locality", "name" : "Wallmart", "subsectionList" : [ { "_id" : "subsection1", "_type" : "SubSection", "name" : "First floor", "sensorList" : [ { "_id" : "sensor1", "_type" : "Sensor", "placement" : "In the hallway" }, { "_id" : "sensor2", "_type" : "Sensor", "placement" : "In the ceiling" } ] }, { "_id" : "subsection2", "_type" : "SubSection", "name" : "Second floor", "sensorList" : [ ], } ], } 

    I want to retrieve ONLY the "sensor1"-object, not anything from the parent.

    Using querying i am only able to retrieve the entire "locality1"-object, with all its underlying subsections and sensors. On a larger scale that is an unnecessary large ammount of data.

    Here is my query so far.

    Locality.find().where('subsectionList.sensorList._id').equals("sensor1").then(doc => { console.log(doc) }) 

    I appreciate any tips! :)

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

    Toggle RFID tag when a book is issued via QR-Code

    Posted: 16 Feb 2019 11:07 AM PST

    Looking for a CSS popup on front page that will match this site:

    Posted: 16 Feb 2019 10:53 AM PST

    Total noob.. found some code I would like to tweak to suit my needs..dunno where to start.

    Posted: 16 Feb 2019 10:28 AM PST

    Hey guys

    As above, im a total noob.. graphics I'm fine with.. but code nope

    I stumbled across this cool looking applet- https://codepen.io/jhnsnc/pen/Mprdaa - I'm a twitch streamer and would like to incorporate this in 2 ways. If someone is willing to explain what I need to change and how, I'm down.

    1. Alerts- I use the stream elements platform for popups. My theme is basically this.. but gray-scale. I would like the triangles to sprawl in from the side stop for a few seconds and move on, thanking follows etc. (Sort of like venom..) I'm aware you can input code for this, I think html and CSS is supported

    2. Transition animation. This is where I will need the clip to start and finish with transparency to create a 'stinger' -in which I'd have to record it as a video file and use this.

    If anyone is willing to help, I'd appreciate it an awful lot as I'm keen to see what's going on here and understand it, without going back to basics.

    Thanks.

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

    Guessing Game (Java) - Random Number method questions

    Posted: 16 Feb 2019 10:14 AM PST

    I am making a guessing game that accepts a number from 1-100. I have the core functionality down unless the user chooses to continue, at which point the "random number" doesn't change. So, if it was 80 then, it is still 80. I've been trying to determine the root of the problem but, I haven't found out yet. The getRandomInt() method is the random number generator and randomInt is the int variable that scores the value given by the method. There are some variables that rely on the randomInt variable in order to determine if the guess is "way to high" or "way to low".

    Also, I have tried to make a if statement that checks for user input to make sure they enter something but, if they don't and just hit enter my error message isn't displayed and nothing happens until they actually enter something.

    Current Code: jdoodle.com/a/YPh

    Help to solve this issue in any way is much appreciated. I'm new to Java (taking my tier 1 course this semester) so, references/explanations that go into detail are amazing.

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

    Building SQL Query With neural nets

    Posted: 16 Feb 2019 01:09 AM PST

    Hi there! I'm tying to create a neural net that will ultimately build an SQL query as it's final output. My goal is to optimize an existing query to give only wanted results (I have a very simple way to tag the results). My problam is that I can't think of a way to turn the output layer of the net (a list of number basically) into a complex query with different where statements and all. Any ideas? Also reading material on the subject will be awsome Btw I'm writing in python

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

    No comments:

    Post a Comment