• Breaking News

    Friday, January 18, 2019

    Disagreement Sr. Dev in Code Review Ask Programming

    Disagreement Sr. Dev in Code Review Ask Programming


    Disagreement Sr. Dev in Code Review

    Posted: 18 Jan 2019 07:44 PM PST

    I recently started a new position and had a code review session with a Sr. Dev. I was a little curious about what others think about what I was asked to change in my code.

    As I was walking through the code, my mentor had stopped and pointed out that my code had "too many" inline comments. That it "caused the code to be cluttered", and they should be removed. Admittedly, I do put quite a bit of inline comments. I've read that good maintainable code has comments that say not only what but why you're code is doing what it's doing.

    Secondly, I was told to put logging statements at the beginning and the end of each method for nothing more than to spit out when your code entered and exited a method. I found this to be contradictory of the previous statements about my inline comments.

    I would like to know what others think about these instructions because I don't seem to find myself agreeing with them even though he's my mentor.

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

    Best method for programming C++ on a Macbook/Mac?

    Posted: 18 Jan 2019 06:40 PM PST

    I'm looking for a way to code in C++ on my Macbook for serious programming/game development.

    I'm not talking about best IDE's, I'm talking about the best method for serious C++ game development on a Macbook (please don't tell me "Lol, good luck with that"). I've heard XCode is an option, but the compiler can get slow for big projects.

    Should I code through a virtual machine running Linux?

    Should I utilize my Windows operating system that I have through Bootcamp?

    Should I utilize a different software? Is Visual Studio for mac any good?

    Hey, Thanks so much for reading. Any response is appreciated.

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

    I just started my first computer science course-- trying to get a head-start, and I'm working with flowcharts...

    Posted: 18 Jan 2019 08:48 PM PST

    I have literally no frame of reference as to what is wrong or right, but I took a crack at the question:

    Management wants a printed report that lists a worker's name and number of hours of overtime worked that week. The overtime is the hours worked minus 40. At the end of the report there must be a number that shows the total of all overtime worked that week.

    Here's my flowchart, am I off? Am I even in the ballpark?

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

    What are my legal obligations when programming?

    Posted: 18 Jan 2019 05:19 AM PST

    I work for a public university. I know we have a mandate for WCAG 2.0/accessibility, and we're also required to prevent all possible attack vectors on the web (XSS, CSRF, IDOR, etc).

    So I've been doing these things for awhile now and it just seems natural at this point. There was a new developer hired in a different department that is completely unaware of these legal obligations before releasing the product to production.

    So it got me thinking; are there any other legal obligations we have that I'm unaware about? It's mostly web application development where I work, and I believe those are the only 2 concerns but didn't know if there were any more.

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

    Does anyone here have a positive experience of MongoDB to share?

    Posted: 18 Jan 2019 02:32 PM PST

    Please, I know it's not phrased well, but I'm not trying to make this a loaded question.

    I recently had an assignment at uni that involved MongoDB. I consider myself a fairly sharp shooter when in comes to SQL, so I was expecting some challenge here, but I really, REALLY struggled (managed OK in the end). So did my colleague who I consider a pretty solid professional.

    I think it's an interesting technology and I can see some use cases, but it's such an oddball thing.

    I'd really like to hear some positive stories from people who've worked with/currently work with MongoDB, and what you guys enjoy about working with it.

    Thanks!

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

    HTML Clickable link with no pointer events

    Posted: 18 Jan 2019 08:23 PM PST

    Hello, I am trying to create multiple links on an image that changes dimensions when you hover over it. When you hover over one of the links, the image reverts to normal. The problem I run into is that I cannot create links that are clickable with no pointer events, because the pointer event is what causes the image to revert. Any help would be appreciated.

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

    What is the Quick and Easy way to write day names along with corresponding date.

    Posted: 18 Jan 2019 07:18 PM PST

    I am creating my own task planner for my University subjects, like this Filling it manually is boring and time consuming, I want to be able to do it automatically. What are the suggested ways to accomplish this task?

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

    Need help with a basic Jquery Function!

    Posted: 18 Jan 2019 02:46 PM PST

    I have a basic menu with sub-items.

    Here's the html

     <ul class="sidebarMenu"> <li class="sidebarActive"><div class="dashboardIcons dashboardDashboard"></div><a href="#">Dashboard</a></li> <li><div class="dashboardIcons dashboardCalendar"></div><a href="#">Calendar</a></li> <li><div class="dashboardIcons dashboardCustomers"></div><a href="#">Customers</a></li> <li><div class="dashboardIcons dashboardLeads"></div><a href="#">Leads</a></li> <li><div class="dashboardIcons dashboardInvoices"></div><a href="#">Invoices</a></li> <li><div class="dashboardIcons dashboardPayments"></div><a href="#">Payments</a></li> <li><div class="dashboardIcons dashboardExpenses"></div><a href="#">Expenses</a></li> <li><div class="dashboardIcons dashboardItems"></div><a href="#">Items</a></li> <li><div class="dashboardIcons dashboardReports"></div><a href="#">Reports</a> <ul class='sub-items'> <li><a href='#'>Leads</a></li> <li><a href='#'>Sales</a></li> <li><a href='#'>Expenses</a></li> </ul> </li> </ul> 

    What I'm trying to do is pass an active class state when someone clicks on one of the main menu items.

    Here's my simple jquery

     //ACTIVE MENU CLASS $(".sidebarMenu li").click(function() { $(".sidebarActive").removeClass("sidebarActive"); $(this).addClass("sidebarActive"); }); 

    What the issue is, is that this also gets applied to my submenu items which I don't want. I want the same function to happen applied to them but only when I click on them exclusively. If that makes sense.

    Any jquery wiz there to help with this? Any help is greatly appreciated!

    submitted by /u/Digital-Daddy
    [link] [comments]

    Animating in command line!

    Posted: 18 Jan 2019 02:09 PM PST

    Hi, I want to create animations for a synth running linux. it runs pure data and is essentially an organelle. how would i go about creating animations that respond to parameter changes, similar to the teenage engineering OP-1? example here: https://www.youtube.com/watch?v=7z4hoazra_g

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

    What is the general term for GC that can move objects in memory?

    Posted: 18 Jan 2019 02:05 AM PST

    My Google-fu has failed me. Is there a general term for garbage collectors which can move objects around the heap, like the JVM and .Net CLR do?

    As opposed to those like the CPython garbage collector, where objects allocated in the heap can be guaranteed to always remain at the same address.

    The closest I have come up with is "garbage collector with a managed heap" but I don't know if that is correct, or the usual term.

    Thanks.

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

    How to paint outside of jpanel class? [JAVA]

    Posted: 18 Jan 2019 04:02 PM PST

    How do I paint on the jpanel outside of the jpanel class? Usually I would paint with paintComponent(graphics g) inside the class that extends jpanel

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

    I was recently hired to redesign a shopify website... on wordpress

    Posted: 18 Jan 2019 11:45 AM PST

    Hi! I was recently hired and instructed to redesign a website on wordpress while still using shopify's store.

    The shopify store will be using a subdomain (shop.xxxxxxxx.com) while the wordpress site will be the regular domain (xxxxxxxxx.com).

    My question is, how can I centralize the login system to where it works on BOTH domains, displays the order, and doesn't completely break the sites?

    I have knowledge with some PHP and MySQL, but I'm reaching out to askprogramming to see if someone knows the proper route without me having to waste a LOT of time through trial and error.

    Thanks!

    I'm looking into utilizing this tool: https://github.com/wpshopify/wp-shopify

    Do you think this will work or help alleviate any potential issues?

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

    Do you have any recommendations for anything that could help someone who is teaching themselves to program?

    Posted: 18 Jan 2019 11:29 AM PST

    I have recently started going through an old C programming book. I am working on teaching myself at this point since I have some free time from college and the college doesn't do classes about programming.

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

    Is scalability purely database related?

    Posted: 18 Jan 2019 08:26 AM PST

    So all of these introduction resources are specifically only mentioning topics related to databases. Is there more to scalability or simply just managing a healthy database architecture?

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

    Witch one easier as a career web or mobile development?

    Posted: 18 Jan 2019 11:16 AM PST

    This question targeting those people who work in both areas, witch one easier web development or mobile development and why? I know people don't like this kind of questions but I realized that web developers have more messy careers than mobile developers.

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

    What are the benefits of using text editors like Emacs and Vim compared to using dedicated software?

    Posted: 18 Jan 2019 09:58 AM PST

    Hey all. Sorry of this isn't the right sub. I've been wondering about this for a while. Many of the programmers I know swear by emacs or vim. But what are the benefits of using it compared to dedicated software? For Python, surely something like Pycharm is better then emacs or vim, or Visual Studio for C++. Even for something like LaTeX or simple documents (not really programming, I know), surely Texmaker and Word would be more powerful, respectively. I can understand using it for when you may not have a gui to work with (using ssh for example), or when the language you're working with doesn't have an ide (Fortran for example), but those all seem like relatively uncommon situations.

    Thanks for any help!

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

    Should I use existing profiler analysis tools (Kcachegrind, Gprof2dot) or create a new one for a language?

    Posted: 18 Jan 2019 08:54 AM PST

    I'm currently working on a programming language that has a profiler but no tools to output the data in a human-readable format.

    There exists profiler visualization tools but would it be easier to create a file that transforms my profiler output to something Kcachegrind or Gprof2dot accepts or should I just make something of my own?

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

    Whats the deal with this in JavaScript

    Posted: 18 Jan 2019 08:47 AM PST

    I have seen a million articles talking about the complexity of the this keyword in JavaScript (and don't get me wrong, it can be a headache), but I don't see similar issues with this in other languages. Why is that? Does the this keyword not fall into the same weird scoping issues in other languages that it does in JavaScript?

    submitted by /u/dexter-stpierre
    [link] [comments]

    How hard is it to create a social network?

    Posted: 18 Jan 2019 06:06 AM PST

    Let's say I wanted a programmer to create a social network (something simple and basic).

    How much work is that? What would the cost of it be to get it set up and have it operating?

    I know nothing about programming, but I have an idea I know will work, and I don't know how to find someone to just do the work for me.

    Thanks.

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

    What is the Best place to look for remote developer jobs UK

    Posted: 18 Jan 2019 05:46 AM PST

    As the title suggests, I'm trying to figure out the best place to search for remote developer jobs. I'm unhappy in my current role and would like to branch out, but sites like Indeed have proven to be a complete waste of time where the "remote" roles listed, aren't actually remote roles. I'm a .NET developer primarily and while StackOverflow seems to have a lot of remote roles, they are quite limited for .NET roles.

    I was wondering if there were other resources I were missing. Most I find via google are US only, or are contract work, which isn't something I can safely pursue. Any and all suggestions are appreciated.

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

    Why there are so many leftists programmers?

    Posted: 18 Jan 2019 06:42 PM PST

    I don't understand, programmers are good with math, but if you are good with math how can you be a communist? basic math proves that communism does not work, how can programmers make this mistake?

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

    How do to manage build environments of different projects in a machine at the same time?

    Posted: 18 Jan 2019 05:28 AM PST

    So, let's say for Project 1 we need gcc version x but for project 2 we need gcc version y
    Or
    let's say for Project 1 we need to install some packages that may cause conflict with some other parts of our environment that will cause Project 2 to build failure

     

    I hope my question was clear, if not please ask.

    submitted by /u/loser-two-point-o
    [link] [comments]

    No comments:

    Post a Comment