• Breaking News

    Thursday, April 4, 2019

    If you're learning Web Development: keep your site light! learn programming

    If you're learning Web Development: keep your site light! learn programming


    If you're learning Web Development: keep your site light!

    Posted: 03 Apr 2019 01:05 PM PDT

    I started building a blog a while back, and I initially integrated Disqus for comments on my articles because I saw everyone else doing it. I had a false sense of security that using Disqus was fine just because other people did it. To my surprise, here's what I found when I finally benchmarked it:

    • No Comments: 26 requests, 220 kB
    • Disqus, AdBlock enabled: 139 requests, 1.7 MB
    • Disqus, AdBlock disabled: 176 requests, 2.3 MB

    Disqus was increasing my payload size by over 10x and my number of network requests by over 6x! Let me be a cautionary tale: you're responsible for your own web performance, so benchmark anything third party you might use. Don't be like me!

    I wrote a post about this + what I replaced Disqus with if you want to read more: Why I Replaced Disqus and You Should Too

    More discussion on this in r/programming: https://www.reddit.com/r/programming/comments/b9022a/switching_off_of_disqus_reduced_my_page_weight_by/?utm_source=share&utm_medium=web2x

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

    Algorithms everyone should know, and books that teach you algorithms?

    Posted: 03 Apr 2019 08:39 AM PDT

    Hey. I'm a self-taught programmer, and I can generally find solutions to all the problems I need, but I am sure sometimes there are better ways.

    This has led me to a question... What are some algorithms every coder should know to not reinvent the wheel (poorly), and do you have any books to recommend that describe them? Thanks.

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

    Not sure if the side project I am working on is considered worthy of putting on portfolio. I have no frame of reference on what is complex or not.

    Posted: 03 Apr 2019 03:36 PM PDT

    Hello everyone, so I have been learning how to program for about 9 months now and I recently got into JS and started a side project called Jammin Movies . The project was originally intended to be used by my SO and I for choosing movies, since we have a movie lsit that we usually use a random number generator to choose a movie off of. The project integrates the Firebase and Python BeautifulSoup. I guess my question is, is this a good project? I have no frame of reference on how to grade myself on how good/complex a project is? Any suggestions on how to up its game?

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

    Learn branching on git

    Posted: 03 Apr 2019 08:20 PM PDT

    Hey there, I've been making a series on git and I just released a new video on branching. If you want a refresher or are learning it for the first time, hopefully this helps: https://youtu.be/uMVOaZ5CwUU?list=PLryLjCZ5Y_8zXZVPD7fKAvsE-5TrvK5e7

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

    So encountered my first production bug and i'm happy ?

    Posted: 03 Apr 2019 11:14 PM PDT

    I don't know I guess I just wanted to share. I started learning javascript around 7 months ago and I just made a web app with actually users. I received a bug report that I didn't anticipate and I feel happy?

    People are actually using something I made ???

    I didn't even fully know what HTTP was a month and a half ago prior to building this web app. 6 months ago I didn't even fully understand divs or how to center them.

    It's the little things.

    I should probably go fix it now.

    Keep progressing - cowboi_bebop 2019

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

    Python pros & cons | Use cases

    Posted: 03 Apr 2019 03:19 PM PDT

    I’m so behind this semester I’m getting every answer off chef

    Posted: 03 Apr 2019 06:46 PM PDT

    I have bouts of depression (I guess some of you think this is an excuse and maybe it is) but I go through it and it gets pretty bad at some points (been like this since I was 14. I cheggef a lot of the assignments, but now I'm going back to do them on my own since I can't even remember what the chegged answers were.

    Is this bad? Even though I'm going back and watching the teachers recordings over and doing my hw even though I'm weeks nehind? I want to redo every assignment over the summer but for now I'm trying to get as much as I can now. I'm so behind

    Did this happen to anyone? They could not keep up?

    Basically I'm way too behind to catch up and like to work slow so I understand everything.

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

    Self taught developer

    Posted: 03 Apr 2019 10:01 PM PDT

    To all those who learned code alone.

    1. What site did you use to learn?

    2. How did you learn?

    3.how long were you able to finish the lessons ans acquire a job?

    1. How did you move from the "foggy speed bump"
    submitted by /u/kr5-2
    [link] [comments]

    I am a Technical Project Mgr but I'm not very technical. Need guidance on where to start.

    Posted: 03 Apr 2019 05:43 PM PDT

    I'll try to keep this short and sweet to garner the most replies :)

    What I do/About me

    I am a technical project manager. Basically, I review bug tickets, validate the problem, and design it for the developer. I also design/manage new features for our applications. Software dev is not my background. It's a long story on how I ended up here, but I was hired for my functional expertise, not technical.

    What I've tried to learn so far

    I started taking Harvard's CS50, for general CS knowledge, but the instructor quickly dived into the C language and is now getting into the weeds of C. It doesn't feel like this is what I need. It also doesn't help that he talks a million miles per hour and bounces from thought to thought.

    What I want to learn

    I'll never need to write code, but I want to learn how to read/analyze it to understand what the app is doing. This is a short scenario that explains what I would like to learn.

    There's a bug in the ABC window. Via the front end I'm not sure what the problem is. I want to go into PL/SQL, find the code for the ABC window and see what it's designed to do.

    From a more general standpoint, I want to know how to be more self-sufficient in my job without having to rely on a developer for every itty bitty question about the code.

    Bonus learning for me

    I'd also like to learn the "cradle to grave" process. From the moment I tell a developer to change some logic to the point that it gets delivered in production. As of right now, all I know is, the developer makes a change, I test it, and simply change the status to complete. From there I know it eventually makes it to production when the next version is deployed. But all the in between would be good to know.

    Okay, not so short and sweet. Sorry!

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

    Would using a database (such as SQL) be more practical than temporary text files in doing calculations for a very large file (12 GB)?

    Posted: 04 Apr 2019 12:50 AM PDT

    Language is Python.

    I aim to produce a text file with multiple rows and colums (calculation results from a 12 GB trajectory file with 20,000 frames) but in the process, I managed to produce at least 5 temporary files containing an exact number of lines (which I then connect together into a single text file). I produced these temp files because I wanted to make sure that each data point is correctly matched with its corresponding identification number.

    I am not creating a website or anything like that, this is only for scientific purposes (simulations) so security is not really a concern.

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

    Struggling with CSS: Which Udemy course is a good option to help improve my understanding of CSS beyond what is presented in the Colt Steele bootcamp course?

    Posted: 04 Apr 2019 12:33 AM PDT

    So I'm working through Colt Steele's web development bootcamp course but feel super shaky in regards to CSS ( I've already completed the CSS/HTML section). I assumed this sort of thing would happen with a course that teaches a broad amount of content like Colt's course does. I do enjoy learning via video with projects along the way, at least for HTML/CSS so far, so I'm thinking about picking up a second course focused on CSS to ensure I improve my understanding of CSS.

    Does anybody have recommendations on CSS focused courses on Udemy to look at that are accessible to beginners? I've found the following two that look good and are by instructors I've seen mentioned on Reddit, but I wanted to get recommendations before I pull the trigger on a course.

    Brad Travesty - Modern HTML & CSS From The Beginning (Including Sass)

    Maximilian Schwarzmüller - CSS - The Complete Guide (incl. Flexbox, Grid & Sass)

    Any recommendations for the above courses? Also, do you recommend any other courses I should look at instead?

    Thanks!

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

    Information Science Major

    Posted: 03 Apr 2019 08:31 PM PDT

    So next school year I'm transferring schools and majoring in Information Science. Because I've never really had a strong footing in math, do you guys think it would be difficult for me to learn programming? Would it be wise for me to continue in the computer science field without being good at math, or am I a lost cause? Thank you :)

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

    Need advice on how to convert a procedural program to object orientated.

    Posted: 04 Apr 2019 12:03 AM PDT

    Hello, I've been tasked with planning the 'phase 1' of a larger project with emphasis being placed on it being object orientated so that it can be built upon later. I've created a diagram for the plan with the current requirements. I'm comfortable with describing data in objects as basically structured data but I'm lost on how I should bring the functions into the objects themselves as class behavior. The target language will be Python, here's the diagram.

    Basically, going to go through a Hadoop Hive database and populate my objects at the schema level, table level, and then partitions of tables level, then one last check to see when the partition data on the filesystem was written. Nuke whatever is pass X days.

    So far things I've considered: Should get_schema_tables be inside a schema? Then get_table_data can go inside table. So each object knows how to 'fill' itself. Should there be one more highest level object called Hive that holds the schema[]? That could hold the get_all_schema and maybe future meta data pass phase 2 that I'm not informed on yet. Then would data_cleanup be a function of the hive (schema[]) object or the individual schema that should be looped on?

    For 0 inputs it could be like

    hive = Hive() hive.get_schema_tables() for schema in hive.schemas: schema.get_schema_tables for table in schema.tables: table.get_table_data() for partiton in table.partitions: partition.check_dates() hive.log() hive.data_cleanup 

    or I guess this master Hive object could just have a one and done function that runs through the steps to populate everything without this above "main" logic being needed. That's another thought of mine that leads right back to procedural.

    I've been racking my mind for a while now on what is the right amount of OOP here, because really it's straight forward enough to do without. Any wisdom on this would be appreciated!

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

    Editing a file on a VPS using github.

    Posted: 03 Apr 2019 11:29 PM PDT

    So currently I have a python script on a server that I edit through a terminal(ssh) vim.

    Is there a way where I could have the python script in a github, work on the script on my local pc, push the changes to github and have the file also updated on the server automatically?

    Github acts as the intermediary I guess.

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

    Programmers, do you enjoy your work? What do you do? What's your title? Curious 18 y/o

    Posted: 03 Apr 2019 07:36 PM PDT

    Hey everyone, I love everything tech but swore off programming for years because it was "boring" but the last week I teamed up with a really skilled programmer (I'm a 3d artist/make music) to make a game and...it's honestly fascinating.

    I love logic puzzles, creating things, tech, I'm not sure how I didn't realize I'd enjoy this and now I'm curious about the career path.

    What do you do? What does your job entail? What do you make in a year? Ect. I'd appreciate any info!

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

    Data Science - is easy get a entry level job?

    Posted: 03 Apr 2019 11:15 AM PDT

    I am learning programming for a while and I have found a lot of courses about Data Science, mainly when I'm looking for material about Python.

    I have been thinking about give it a shot, but a friend said me that is a really hard area to get a job, you would have to study for long years to get a entry level one. I don't have that time :/

    Is it really like that?

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

    How to build proper test cases?

    Posted: 03 Apr 2019 11:10 PM PDT

    Hey guys, new to programming and web dev here. Have been pouring my head into youtube Django tutorials and also found Vito's gem online on introduction to Django. I'm roughly starting to understand how web dev programming works but I just cant seem to comprehend how to think of test cases, or come up with my own test cases - are there any good readings on this? Trying to get behind the scenes of how to think and craft proper test cases, and also are test cases really that important?

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

    Is sentdexs learn to program with python playlist a good way to learn python?

    Posted: 03 Apr 2019 11:07 PM PDT

    Im trying to learn python and am wondering if this is a good place to start

    submitted by /u/sebE-
    [link] [comments]

    Can you still make a modern web app with only jQuery?

    Posted: 03 Apr 2019 03:23 PM PDT

    I remember when I first started learning web design, the majority of libraries literally just told you to download the whatever.min.js file and stick it in your HTML, and I did literally everything with jQuery. I still use that for my blog and I think that's fine because it's just designed to display static content. Even with all JavaScript disabled it works okay.

    Literally the only JavaScript library I'm familiar with is jQuery.

    But now I'm thinking of making an online game that runs in the browser as my next big webdev project, and I suspect that I'll have to generate most of the page using JavaScript since it would be highly dynamic. Looking at the open source web games, literally all of them use node.js some kind of frontend framework like Vue or React. In order to prevent myself from drowning in spaghetti code when coding the frontend of a modern, JavaScript heavy web app, do I basically have to use a framework or can I still get away with jQuery?

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

    (Python) Code (from tutorial) won't work

    Posted: 03 Apr 2019 10:25 PM PDT

    character_age = 500

    character_name = "jolly"

    print ("there once was a man named" +character_name+)

    print ("he was" +character_age+ "years old")

    This code works in the tutorial that I am watching, but when I call it in the terminal "python 3 py2.py" it runs the program but gives me an error with the character name veriable saying that it is a syntax error.

    I have run it with and without the "+" in and out of (), in and out of "" in all different combinations.

    How do I define and call a variable in python?

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

    I created a madlibs game and it is not reading the file

    Posted: 03 Apr 2019 10:16 PM PDT

    I'm using the intellij idea. https://imgur.com/a/tS4CuUv

    This is what it is saying. I created the file as you can see and there is currently no text in the file. I just created it by right clicking Madlibs class and hitting file. Was I supposed to hit Scratch File, or Kotlin file? This is confusing.

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

    Transitioning from python to C++

    Posted: 03 Apr 2019 09:59 PM PDT

    I use python in my career as a animation TD and I have become fairly proficient in it. Seeing as the animation industry is moving towards real time rendering, I want to get ahead of the curve and start learning C++. I'd like to mainly focus on Unreal programming but I figure it would be best to learn standalone C++ first.

    Does anyone have resources on learning C++ when you already know some programming fundementals? Resources on Unreal specific C++ would be appreciated as well.

    Thanks!

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

    My AJAX/PHP Form POST is still redirecting, and I have no clue why.

    Posted: 03 Apr 2019 09:54 PM PDT

    So I'm just doing basic forms, and I didn't want my page to redirect. I decided to learn AJAX to make this happen, and I'm beyond frustrated right now because no matter what I do, it still redirects to the PHP file that handles inserting into my database.

    The insert works, the info is sent, but it still redirects.

    Here is my code:

    <!doctype html> <html lang="en"> <?php include 'php/db_connection.php'; $conn = OpenCon(); ?> <head> <meta charset="utf-8"> <title>Conner's Webpage</title> <link href="css/bootstrap.css" rel="stylesheet"> <link rel="stylesheet" href="css/styles.css"> <script> $(document).ready(function () { $("form").submit(function (e) { e.preventDefault(); $.ajax({ type: "POST", url: "testinsert.php", data: {firstname: $("#firstname").val(), lastname: $("#lastname").val()}, success: function (response) { alert(response); } }); }); }); </script> </head> <body> <form action="testinsert.php" method="post"> <div class="form-group"> <label>First Name</label> <input name="firstname" type="text" class="form-control" placeholder="First Name"> </div> <div class="form-group"> <label>Last Name</label> <input name="lastname" type="text" class="form-control" placeholder="Last Name"> </div> <button type="submit" class="btn btn-primary">Submit</button> </form> <hr> <footer class="container"> <p>&copy; Company 2017-2019</p> </footer> <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.2.2/jquery.form.min.js" integrity="sha384-FzT3vTVGXqf7wRfy8k4BiyzvbNfeYjK+frTVqZeNDFl8woCbF0CYG6g2fMEFFo/i" crossorigin="anonymous"></script> <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery-slim.min.js"><\/script>')</script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> </body> </html> 

    And the PHP Insert if that matters:

    <?php include 'php/db_connection.php'; $conn = OpenCon(); $firstname = $_POST['firstname']; echo $firstname; $lastname = $_POST['lastname']; echo $lastname; $sql = "INSERT INTO `testtable` (nameID, `firstname`, `lastname`) VALUES (DEFAULT, '$firstname', '$lastname')"; if (mysqli_query($conn, $sql)) { echo '<script language="javascript">'; echo 'alert("Item Successfully Saved!")'; echo '</script>'; } else { echo '<script language="javascript">'; echo 'alert("Item Unsucessfully Saved!")'; echo '</script>'; } CloseCon($conn); ?> 

    I did this test form/insert to see if it replicated from my bigger project I'm working on, and yes this one does the same redirect too.

    I appreciate any help.

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

    How do I get a notification when my ssh terminal program is done running? (linux)

    Posted: 03 Apr 2019 09:40 PM PDT

    I know terminal-notifier is a great way to get notifications as soon as your terminal program is done running, but what if I am SSH'd into a Linux machine and want a notification after a program in the Linux machine is done running? Is there a way to do this?

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

    No comments:

    Post a Comment