• Breaking News

    Tuesday, July 14, 2020

    Novice programmer, what paths should I take and what should I avoid when looking to have a coding career? Ask Programming

    Novice programmer, what paths should I take and what should I avoid when looking to have a coding career? Ask Programming


    Novice programmer, what paths should I take and what should I avoid when looking to have a coding career?

    Posted: 14 Jul 2020 10:35 AM PDT

    I've been learning coding for about a month and a half now, which I was drawn to because 1) it's a skill I hear is in demand, 2) it's a skill you don't have to have a formal qualification in to get a job, 3) it's a skill that can be learnt from home, for free, in your free time. Specifically I've gone over the very basics of Python, as well as some basic data analysis lessons in Jupyter with pandas, covering data cleaning, tables, graphs etc. One thing I've heard anecdotally a few times across some of the programming related subreddits is of people having no experience in coding at all, then after a year of teaching themselves manage to land a job in it. Is this typical or are these outliers? What factors determine going from novice to employed so quickly?

    A concern I have about pursuing a career in coding is that I don't want to end up following a path that becomes obsolete in a couple of years time, see https://twitter.com/sharifshameem/status/1282676454690451457

    This comes after I was under the impression that coding was a profession that would be safe from automation for some time. For those with experience, who understand the industry and where it is heading, which sort of paths is it best to go in to have a career and I won't end up learning something that is no longer employable in a short amount of time? Or if that's a stupidly wide net to be casting, what paths/specialisations do I want to avoid? Am I better off going "wide", and learning several different programming languages and tools, or going "deep" and sticking to python and data analysis to become really good at it and ignoring everything else?

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

    What kind of scale/magnitude to grow a human digitally from DNA sample?

    Posted: 14 Jul 2020 12:59 PM PDT

    Wondering if it's currently possible. I remember something about how the human genome when they figured it out was giant stacks of papers...

    If you wanted to grow someone digitally from DNA, particularly grow a brain structure from what the DNA instruction set has.

    Probably very impossible/all the compute that exists today couldn't simulate all the atoms/molecules?

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

    How hard would it be to write a script that finds a symbol or sometimes multiple symbols displayed on my computer screen and automatically click it for me when I press a button on my mouse or keyboard?

    Posted: 14 Jul 2020 11:15 PM PDT

    How do I add a QR scanner to a website and use it to update a DB?

    Posted: 14 Jul 2020 10:51 PM PDT

    I want to write a simple webapp in which you can enter your name, then scan a QR code and a database is automatically updated with your name in it.

    Uses: To take attendance for a meeting

    Please tell me the tools I can use or post useful links. Thanks!

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

    Number -> 3D position (within boundaries)

    Posted: 14 Jul 2020 06:38 PM PDT

    I'm trying to make a function to transform a number into a point within a 3D cube, let's say 5x5x5 for now. I'm terrible at explaining things but I'm gonna try my hardest. Basically, if the number is 5, then the function would give me [ 5, 1, 1 ], but if the number is 6, it would wrap around to Z: [ 1, 1, 2 ]. Then, if it's 25, it would wrap to Y: [ 1, 2, 1 ]. I've been trying to come up with something, but everytime I change something it gets farther and farther away from what I want it to do.

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

    Can you terminate a forEach loop once a certain key/value pair matches your criteria? Or is there a way to refactor this solution? (AngularJS)

    Posted: 14 Jul 2020 06:16 PM PDT

    I'm caught at a cross roads between web development and Java Development as a career Pursuit.

    Posted: 14 Jul 2020 12:17 PM PDT

    I was told by a few friends of mine to join Reddit as I would probably get a good answer for this here. I was let go from my job back in March working in finance. I've dabbed in programming and web dev on and off and decided that I want to make a career doing either one for myself as I want to go home at the end of the day and feel like I have something to show for it.

    Problem is I can't decide which avenue to follow and stick to. I have a degree in History and worked in finance since graduating. I already know the road is not an easy one to travel. Everything I've been told and read about the subject in contradictory. I have friends and recruiters telling me to pursue web dev and then there's other recruiters and articles saying no go for programming.

    I have ideas for projects to add to my github for both. With Web Development I wanted to make in browser apps like a DnD character creator and with java I wanted to do either minecraft mods or Android apps.

    With all that said I could use some more insight as to whether it's more realistic to go for web development or to follow the path of java/ regular programming and come out at the end with at least an entry level job. My own indecisiveness is holding me back and I want to put this to rest once and for all.

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

    Super JavaScript beginner here. Can't seem to figure out what is wrong with my code:

    Posted: 14 Jul 2020 04:57 PM PDT

    Write a function called charAt which accepts a string and an index (number) and returns the character at that index.

    The function should return an empty string if the number is greater than the length of the string.

    Do not use the built in charAt method - the tests will fail if you do!

    Examples:

    charAt('awesome', 2) // 'e' charAt('awesome', 12) // ''

    ----- My Incorrect Answer----- function charAt (str1, num) {

    if (str1.length <= num) {console.log (str1[num])};

    else if (str1.length > num) {console.log (' ')};

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

    What are some simple project ideas to showcase full-stack (including cloud, CI/CD)

    Posted: 14 Jul 2020 10:25 AM PDT

    I've been learning Java Script for a while, and wanted to work on something full-stack to start learning pretty much everything from system design, setting up platform and CICD. What are some simple project ideas to learn, what stack should I learn for the sake of simplicity, which platform is student friendly?

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

    Best way to setup a C++ to Python pipeline?

    Posted: 14 Jul 2020 03:53 PM PDT

    I'm workimg on a computer vision project and decided to use TensorFlow as the computation engine, however image capture and preprocessing has to be done in C++. Since TF's primarily interface is Python, I thought that instead of using TF's C API that has barely any documentation/tutorials and lacks the features that the Python binding has, I'd instead just learn Python and integrate it with C++ down the road. So what's the best way to do somethint like this?

    Here's a brief on my project: Capture an image -> Preprocess in c++ -> Spit Image out -> Tenaorflow receives image -> outputs an xml file with object descriptions/locations -> xml file is parsed in php and finally rendered as a web page.

    All of this will be happening offline, right on the server. So I don't need to integrate Python with C i just need to interface them externally.

    P.S I also know that I can just something basic like write the file to disk from c++, then issue a system call from C++ to run the Python interpreter and execute the script, but I was womdering if there was a better approach?

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

    Can I combine multiple MIT licenses together?

    Posted: 14 Jul 2020 07:56 AM PDT

    I'm writing a program that uses two libraries that are licensed under the MIT license. Would I be able to include only one copy of the license with the copyright lines from both licenses?

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

    JSON to TOML formatting question

    Posted: 14 Jul 2020 06:24 PM PDT

    Hello Everyone!

    I am currently attempting to transition between using JSON to using TOML for a few config files. However, I cannot seem to figure out how to properly arrange objects inside the TOML file, to match how it was done in the JSON file. How would the following JSON object be represented in TOML?

    [{"cat" = "No_water","frog" = "Yes_water"},{"cat" = "Yes_fur","frog" = No_fur"}]

    Thanks!!

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

    What would happen if someone were to open a driver file in notepad and randomly write stuff there and save those changes

    Posted: 14 Jul 2020 10:33 AM PDT

    A kid asked me this, and I wasn't sure myself

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

    Hey i'm new programmer i need to know how to make my website images show in google images to link to my website

    Posted: 14 Jul 2020 07:03 AM PDT

    Insert comments (Social Network)

    Posted: 14 Jul 2020 03:24 PM PDT

    I'm building a social network and wanted to get the users to comment posts. I can make it work if it is without my desing, but when I add the desing I don't know how to make the transaction of the raw code to the code and design. I have an RESTAPI that I use to some things like: show/like posts,Delete Posts, show the comments and other stuff and I use the raw code with the desing implement on the page to create posts, but I don't know if it will be easier to add the raw code to the design or simply just make it through the RESTAPI...

    RawCodeToCreateComments.php

    <?php include('./classes/DB.php'); include('./classes/Login.php'); include('./classes/Post.php'); include('./classes/Comment.php'); $showTimeline = False; if (Login::isLoggedIn()) { $userid = Login::isLoggedIn(); $showTimeline = True; } else { die('Not logged in'); } if (isset($_GET['postid'])) { Post::likePost($_GET['postid'], $userid); } if (isset($_POST['comment'])) { Comment::createComment($_POST['commentbody'], $_GET['postid'], $userid); } if (isset($_POST['searchbox'])) { $tosearch = explode(" ", $_POST['searchbox']); if (count($tosearch) == 1) { $tosearch = str_split($tosearch[0], 2); } $whereclause = ""; $paramsarray = array(':username'=>'%'.$_POST['searchbox'].'%'); for ($i = 0; $i < count($tosearch); $i++) { $whereclause .= " OR username LIKE :u$i "; $paramsarray[":u$i"] = $tosearch[$i]; } $users = DB::query('SELECT users.username FROM users WHERE users.username LIKE :username '.$whereclause.'', $paramsarray); print_r($users); $whereclause = ""; $paramsarray = array(':body'=>'%'.$_POST['searchbox'].'%'); for ($i = 0; $i < count($tosearch); $i++) { if ($i % 2) { $whereclause .= " OR body LIKE :p$i "; $paramsarray[":p$i"] = $tosearch[$i]; } } $posts = DB::query('SELECT posts.body FROM posts WHERE posts.body LIKE :body '.$whereclause.'', $paramsarray); echo '<pre>'; print_r($posts); echo '</pre>'; } ?> <form action="index.php" method="post"> <input type="text" name="searchbox" value=""> <input type="submit" name="search" value="Search"> </form> <?php $followingposts = DB::query('SELECT posts.id, posts.body, posts.likes, users.`username` FROM users, posts, followers WHERE posts.user_id = followers.user_id AND users.id = posts.user_id AND follower_id = :userid ORDER BY posts.likes DESC;', array(':userid'=>$userid)); foreach($followingposts as $post) { echo $post['body']." ~ ".$post['username']; echo "<form action='index.php?postid=".$post['id']."' method='post'>"; if (!DB::query('SELECT post_id FROM post_likes WHERE post_id=:postid AND user_id=:userid', array(':postid'=>$post['id'], ':userid'=>$userid))) { echo "<input type='submit' name='like' value='Like'>"; } else { echo "<input type='submit' name='unlike' value='Unlike'>"; } echo "<span>".$post['likes']." likes</span> </form> <form action='index.php?postid=".$post['id']."' method='post'> <textarea name='commentbody' rows='3' cols='50'></textarea> <input type='submit' name='comment' value='Comment'> </form> "; Comment::displayComments($post['id']); echo " <hr /></br />"; } ?> 

    This code displays this:

    https://i.stack.imgur.com/ka7Zm.png

    Also the commentClass.php

    <?php class Comment { public static function createComment($commentbody,$postid,$userid) { if (strlen($commentbody) > 160 || strlen($commentbody) <1) { die('Incorrect Length'); } if(!DB::query('SELECT id FROM posts WHERE id=:postid',array(':postid'=>$postid))) { echo "Post id invalido"; } else { DB_update::query_update('INSERT INTO comments VALUES (\'\',:comment,:user_id,NOW(),:post_id)',array(':comment'=>$commentbody,':user_id'=>$userid,':post_id'=>$postid)); } } public static function displayComments($postid) { $comments = DB::query('SELECT comments.comment, users.username FROM comments, users where post_id = :postid AND comments.user_id = users.id',array(':postid'=>$postid)); foreach ($comments as $comment ) { echo $comment['comment']." --commented by ".$comment['username']."<hr/>"; } } } ?> 

    Here's a photo of my design:

    https://i.stack.imgur.com/oTP08.png

    In that modal I would want to have a textarea and a button/input that would let the users comment but Im not getting it right. Already tried to implement the raw code into the design but I think I'm not sure how to implement it... Here's the github (https://github.com/pedroPereira18/SocialNetwork) so you can have a better look at it

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

    (SQL) is there a universal way to compute checksums on columns for verifying replicated data

    Posted: 14 Jul 2020 03:06 PM PDT

    for example, quickly validating the data in a postgres source matches what was loaded into a mysql destination.

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

    Help me select a C++ Design pattern

    Posted: 14 Jul 2020 10:47 AM PDT

    I'm trying to create a test generator which creates 100s of tests that have multiple files (C files, tcl files, etc.). Each test consists of C & tcl files. ONLY the tcl file will have some lines where the values change for every individual test.

    Eg. Directory Test_1 contains the following files

    test.c test.h top.h top.c test.tcl

    At a crude level, I know this can be easily made (without classes). But I doubt its the correct way.

    On the other hand, if I create a "top" class that has all the methods defined to generate the required files, I could create objects & call the necessary functions. (Again, I'm not sure whats the best way to get it to repeatedly generate the files.)

    I recently came across different design patterns but I don't know anything about them. (I'm from an embedded background.) The Factory Method seemed to fit. (correct me if that's not so or if there's a better way)

    https://refactoring.guru/design-patterns/factory-method

    I'm trying to figure out how (& whats a good way) to design the application. Is there a particular design pattern that is apt for such an application?

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

    I Read, But Can't Remember Where, That You Shouldn't Store Dates as Strings

    Posted: 14 Jul 2020 10:44 AM PDT

    ...I'm hoping some fellow developers will elaborate on this, and if I'm lucky, offer some advice.

    My use case is simple:

    I have a collection of tasks, and I want to be able to check if a task has been completed for the day.

    So each task will have daysComplete array, the array will look like this:

    daysComplete: [{ '01012020': 'true' }, { '01022020': 'false' }, { '01032020': 'true' },...] 

    Since my worker function will only need to check on whether a task was completed that day (not at a time, etc) it seems logical that I could just store the dates as strings, and then pass a string representing the current date to the db to run the check.

    Why is this a bad idea?

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

    When using Ruby and the dnssd gem, it's properly installed, but it always gives errors, even with it's own example programs.

    Posted: 14 Jul 2020 01:55 PM PDT

    This is dnssd - http://docs.seattlerb.org/dnssd/index.html

    The front page even has a couple examples you can run, yet those fail with their own errors. Here are a few:

    https://pastebin.com/raw/1gRc6eSb

    I've installed ruby via rvm, dnssd is installed via rubygems. I'm trying to learn how to use it but I can't get any of it's own examples to run. I'm trying to just get it to announce a web server via a .local domain, and since I've googled it, it seems someone else has already asked about this exact thing before and was told to use dnssd, but they didn't seem to report any errors afterwards like I'm getting here. What am I doing wrong?

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

    [C#] What are the advantages of using Func in this case?

    Posted: 14 Jul 2020 09:55 AM PDT

    It's from a tutorial and may not be the best example to demonstrate the advantages of Func but I'm still curious how it can be advantageous in this particular example

    class Program { static int Sum(int x, int y) { return x + y; } static void Main(string[] args) { Func<int,int, int> add = Sum; int result = add(10, 10); Console.WriteLine(result); } } 
    submitted by /u/notpreposterous
    [link] [comments]

    "Local candidates only"

    Posted: 14 Jul 2020 01:39 PM PDT

    Hey everyone, I hope I'm asking this in the right place. I don't know what to do about this problem.

    I was a Junior Engineer working in Sonoma County (that's an hour north of San Francisco, considered the absolute northern edge of the Bay Area). I was recently laid off, and so was my wife, so we urgently want to move down to Irvine (Orange County, Southern California) where our families live. We really don't have any friends/family/support up here.

    I've sent out several dozen applications to that area, despite virtually all of them saying "Local candidates only." If it matters, I'm using Indeed. Almost none of them have responded to me. I actually did get an invite for an interview a few days ago, but when I reminded the guy that I would need to travel for the interview or do one remote, he said, "Oh, wow I can't believe I didn't see that! You're pretty far away. Usually we just toss the applications that aren't from around here."

    I turned down that interview after learning they wanted to pay me less than I was making before, and they also don't offer any benefits whatsoever. I have a critical health condition so health insurance is my # 1 priority.

    What am I supposed to do about this "local candidates only" problem? I live in basically a farm town; I had the only Junior Dev position in a 50-mile radius.

    I'm even struggling to understand how people move from California to Seattle or Portland for dev work. How do you do it? How do you convince someone to hire you when you're a thousand miles away?

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

    Question on mobile card readers

    Posted: 14 Jul 2020 07:39 AM PDT

    So I want to develop for my application a way of taking debit and credit card payments but I don't want to use squares api cause I don't want my end user to have to lose money to two people in this case me and square I just want the app to take my fee so I was wondering is there a way of doing that with the square card reader or is there another option?

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

    I am struggling to make my first website: HTML&CSS

    Posted: 14 Jul 2020 12:55 PM PDT

    I am tackling my first web project, I have several questions if someone could help me out with them. I am adjusting my items arrangement on screen by viewing my in program viewer, but when scaled up things tend to move around, so my solution has bad compatibility with viewing devices? I also wanted a slant for my lower overlay however I couldn't figure that out so I just did a border at 100% on the right corner, is there any tricks to solve these?

    I can explain what some of the elements are intended for if that helps, I just haven't fully implemented them yet, I am learning as I go.

    also please ignore my text/pic stand-ins I typed half of them at 5am with memes on the mind and the picture was somehow the only one saved to my pc. its origins unknown.

    Images:

    In editor view and in browser

    Pastebin:

    Here is my CSS

    Here is my HTML

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

    About to Enter the Workforce

    Posted: 14 Jul 2020 06:44 AM PDT

    Hello, so here is my situation. I am looking to enter the workforce as a programmer in the coming weeks. I have associates in computer science and am currently attending a "bootcamp" that ends in 10 weeks. They work to place me in a job after graduation.

    However, as much as I have grown as a programmer not only in knowledge but in confidence and in passion, there is still lacking knowledge of the professional field itself.

    People have begun to ask me what kind of programming work I want to do and I am left without answers. I have no idea what opportunities exist, much less a specific desire.

    So my question to you today programmers, is what kind of work do you do? Do you love it? Do you just exist for the money? What do you suggest, what have you learned. Please, any and all information on programming will be welcome. Please, ramble and educate me.

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

    No comments:

    Post a Comment