• Breaking News

    Wednesday, September 18, 2019

    Anyone here write programming articles? Why do you do it? Ask Programming

    Anyone here write programming articles? Why do you do it? Ask Programming


    Anyone here write programming articles? Why do you do it?

    Posted: 18 Sep 2019 04:36 PM PDT

    Hey! What has been your experience writing articles either on Medium or on your blog and I'm curious to know why do you write them?

    Also, link me to your blog if you got one!

    Thanks!

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

    Why is Java either hated or just merely accepted to work with as a language?

    Posted: 18 Sep 2019 03:42 PM PDT

    Most languages out there have both fans and haters. Favourite languages are e.g. Python, Ruby, C#. But as far as I've seen, this isn't the case with Java. Java as a language has almost no fans, i.e. people who can say "I love this language and I'd like to work with it forever!", and it has haters. Many programmers even just feel obligated to like Java because they work with it. Many try other alternatives to Java. Why?

    Why is Java hated as a language? I'm not supporting it by asking this in any way, I just can't see if it has any extreme flaws that prevent it to be loved. I personally just like it as a tool.

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

    Trying to figure out which language would be best for my next project

    Posted: 18 Sep 2019 04:37 PM PDT

    I'm working on something where I'm trying to use gyroscope and accelerometer data to map out movement in a 3d space relative to the starting position and am trying to figure out which language would work well for this? Right now I'm looking at python, java, or c++. Would any of these languages work or would one of them be better than the others?

    Edit: I know basics of these 3 languages already and want to pick one to learn for this project

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

    What programming language is most AI learning done in?

    Posted: 18 Sep 2019 06:42 AM PDT

    I'm curious because a neat video popped up in videos about hide and seek agents. Thought it was cool and wanted to know more about it!

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

    In .netcore, what's the most efficient way to use a PartialView to insert multiple objects into a collection?

    Posted: 18 Sep 2019 02:11 PM PDT

    I've been going around in circles on this one for a few hours. Most examples seem to be 4-5 years old. I have a few requirements but I would have thought that they are fairly standard but I can't find an example that follows just about any of them.

    I have an object, say

    Car

    Car has multiple properties

    [Required] Color

    Size

    Weight

    I have a viewmodel which has List<Car> Cars

    I'm trying to figure out how to present the view with an empty form. So, presumably I call <partial name='_SelectCars'> which would show me a blank form.

    I then need an Add button to append (?) the partial (to what, a parent div??) to allow another car but this would also have a Delete button.

    Then I need to Submit and have the new Cars all be part of the same collection but I would also want Unobtrusive Validation to kick in if the Color isn't set.

    This might seem like a lot but I find it a very simple, real world case for which I simply cannot find any examples?

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

    Programming language question for a writer.

    Posted: 18 Sep 2019 04:48 PM PDT

    Hi,

    I'm a writer(fiction) , and I know zip about programming but as part of something I'm working on I need a little help. I've done a lot of reading online but I wonder if someone could clarify something.

    My question relates to programming AI/ML systems, which I understand are often coded in Python, for example. However if you want to use an AI/ML in an Embedded system...aircraft in this case...what exactly is the process? You write the ML algo in Python and then...is it 'translated'/adapted.....(sorry I don't know the correct terminology) into ada (which I understand is used in Embedded systems software..? Or do both systems run simultaneously on different 'computers'/CPU's?

    I hope that makes sense to someone.

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

    How Is Something Like The Alfred Camera WebViewer Made?

    Posted: 18 Sep 2019 03:08 PM PDT

    How would a web application like Alfred Camera WebViewer be made? Official website. I'm wondering about things like the potential stack, architecture and how it works.

    Images: Image 1 Image 2

    I'm thinking of writing something similar but I'm not sure how to tackle the problem and wanna scope it out a bit. Any incite would be greatly appreciated.

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

    What is the purpose of `finally` in `try/catch/finally`?

    Posted: 18 Sep 2019 01:53 AM PDT

    I have used try/catch when programming, and I've seen people use try/catch/finally.

    According to my research, the `finally` part always executes, regardless of whether an exception was caught.

    What is the purpose of that? Can't I just put the `finally` stuff after the `try/catch` stuff instead of making an extra block of code?

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

    Where to get started on web app development with Python / Django?

    Posted: 18 Sep 2019 07:46 AM PDT

    Hi, as it says in the title, I'm new to web app development so I want to get started on learning using python / django. What material like books / videos / websites would you all recommend me so I can get started?

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

    Can you explain in simple terms how to put info from a third party API onto my website?

    Posted: 18 Sep 2019 01:28 PM PDT

    I am fairly inexperienced with programming in this manner.

    Here is the situation: I am creating a website that needs to display some variables of data from a 3rd party. I know how to access the api information I need, for most part: 3rdpartyapi.com/api/variableXYZ....

    Of course, when I visit that specific domain, I see all the information I need on my website. This is basically where I am stuck at. How do I put that information on my website? I have read about Jquery, php, and JSON. But specifically, is there a tool I can use that could use to make things easier for a beginner? Do I need to create separate files for each?

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

    For retro game consoles, could you not use high-level programming because of low RAM?

    Posted: 18 Sep 2019 12:48 AM PDT

    If the console had more RAM, could you make games with Python for example? I dont get what the limitation was to provide an SDK for example instead of having to do something like assembly. What was the reason?

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

    What's a good way for an otherwise-experienced programmer to learn "web basics" quickly?

    Posted: 18 Sep 2019 12:42 PM PDT

    Background:

    1. I've been build programming languages (probably-badly), parsers (hopefully-less-badly), tooling, and ports for the last decade-and-change.

    2. I have some (many-years-out-of-date) HTML and CSS knowledge, acquired mostly through osmosis.

    3. I last touched Ruby on Rails in, like, 2007; I basically learned it, got roped into Ruby's internals, and never looked back at ~web stuff~.

    I'm looking for work (endlessly), and it really seems like most everything out there is, well, Web Stuff. In fact, in my primary community (JavaScript), I don't think I've met a single person who, like me, can't answer the question 'so what to do you do' with a word ending in '-end': front-end or back-end web development. Meanwhile, over here in Elliott-land, I like, don't know SQL.

    Soooo, I feel the need to catch up; but I really don't want to start with a day-1, what-is-a-HTTP-verb tutorial. I can't be the only person in this position; aren't there low-level developers out there transitioning into the Web space every day?

    tl;dr: What effective resources would you suggest to non-Web-focused programmers attempting to transition into Web fields? Especially if they're recent, and/or succinct!

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

    What's the difference between the following two instances of code?

    Posted: 18 Sep 2019 10:45 AM PDT

    So let's say I want to create a window in Java, just a simple window, nothing more and nothing less. I have two options (that I know of), and I'd just like to know what the difference(in functionality and optimization, code cleanliness etc.) between the two is:

    So: Variant number one is to extend JFrame with my class and to create an object of it within itself, basically getting all of JFrame's methods etc.:

    https://pastebin.com/KYg6Jfnu

    -OR- one can make it by making an object of JFrame itself and then doing it through that

    https://pastebin.com/xk9ie7nN

    Which one gets used more often? Personally I've made countless projects using the first variant and haven't run into a problem, but then again they haven't been interface-heavy projects, instead they were just a gateway to display paint stuff. Basically the question is also which one is the "standard"?

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

    What language should I use if I want to build a server for a mobile app but it has an AI/computer vision component?

    Posted: 18 Sep 2019 10:30 AM PDT

    I know python is good for AI but a strict object orientated language like Java might be good for a server. From my first thoughts the choices would be either Java or python, maybe c++ or JavaScript (with node js). Also if anyone has good experience with computer vision or AI please send me a pm, I have a few questions if you have the time!

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

    Hackerrank Problem Code Review

    Posted: 18 Sep 2019 10:21 AM PDT

    Hi all,

    I just wanted to see if I can get some feedback on my approach to find-kth-term kind of problem.

    Whenever I come across these kinds of problems, I tend to just sort the array and return the kth element (unless its the first or the last index). Would this be a good approach?

    Also here's my solution to the Hackerrank problem where I had to find the 4 smallest elements and 4 largest elements and do some summations:

    int comparator(const void *p, const void *q) { long *l = (long *) p; long *r = (long *) q; return (*l - *r); } // Complete the miniMaxSum function below. void miniMaxSum(int arr_count, int* arr) { long max = 0, min = 0; qsort((void *)arr, arr_count, sizeof(arr[0]), comparator); for (int i = 0, j = arr_count - 1; i < 4; i++, j--) { max += arr[j]; min += arr[i]; } fprintf(stdout, "%ld %ld", min, max); } 

    (Pastebin is down right now so I couldn't share it on there - my apologies)

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

    I understand how logic gates preform Boolean logic, but how does that come together to create variables, functions, scope, and all the other concepts we're used to working with in programming?

    Posted: 18 Sep 2019 09:05 AM PDT

    Is there a subreddit for esoteric programming languages?

    Posted: 18 Sep 2019 08:35 AM PDT

    Just out of curiosity

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

    How to know/remember when to use data structures / OOP / etc

    Posted: 18 Sep 2019 08:29 AM PDT

    This is primarily in regards to C++ but obviously applies to programming in general.

    When you encounter a project/problem/prompt, how do you know how to approach it? How do you know when to use a Graph vs a Tree vs a simple array vs a stack, etc? Or knowing if OOP is necessary or not. Or how do you know when it might be a good idea to use polymorphism or inheritance or stuff like that.

    My main problem is I know that these things exist and I know how they work. But they aren't the first things that come to mind when I begin coding. Is this something that just comes with more experience?

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

    When you're good at coding, how much problem-solving do you have to do?

    Posted: 18 Sep 2019 07:59 AM PDT

    Background: I've just done the Khan Javascript animation course and have started the computer science algorithms one. My goal is to create an app (just for fun).

    I always assumed programming was similar to HTML - that it would be relatively easy to create a program once I learned the language. Sure, I'd have to look up stuff and solve problems from time to time (in the same way you'd look up HTML syntax to help create something you hadn't tried before) , but it wouldn't be an endless series of problem-solving.

    However, thus far, it has mostly been problem solving. For instance:

    A key step in many sorting algorithms (including selection sort) is swapping the location of two items in an array. Here's a swap function that looks like it might work, but doesn't: -the code prints out [9, 9, 4] when it should print out [9, 7, 4]. Fix the swap function.

    So - do programmers spend their days solving problems like that (or more complicated, like improving the efficiency of an algorithm), or is solving problems more of an occasional thing once you're good at writing code?

    To draw a comparison, I edit videos in my spare time. When you're starting out or want to try a new feature, it can involve a lot of tedious googling and messing around with the program. However, once you work out how to get the program to do what you want, you can spend a lot of time enjoying creating the video. Is programming similar, or is it just challenge after challenge?

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

    Question about Javascript promises

    Posted: 18 Sep 2019 07:57 AM PDT

    Hi all, I'm currently trying to learn Javascript and I can't seem to understand why resolve can be called in this function. It's not defined anywhere else, yet the function compiles normally and returns "resolved".

    function foo() { return new Promise((resolve, reject) => resolve("resolved")); } 
    submitted by /u/a_killuat
    [link] [comments]

    Where is my code inefficient?

    Posted: 18 Sep 2019 07:34 AM PDT

    Trying to pass this CodeWars kata but the full test suite keeps timing out because my code is too inefficient. Could anyone help me understand where it can be improved? Thanks!

    import java.util.*; import java.util.stream.*; public class RemovedNumbers { public static void main(String[] args){ List<long[]> result = RemovedNumbers.removNb(26); result.stream() .map(L -> Arrays.toString(L)) .forEach(System.out::println); } public static List<long[]> removNb(long n) { List<long[]> hits = new ArrayList<>(); long sum = LongStream.range(1L,n + 1L).sum(); for(long j = 0L; j <= n; j++){ for(long k = 0L; k <= n; k++){ if(j * k == sum - j - k){ hits.add(new long[]{j,k}); } } } return hits; } } 
    submitted by /u/codingquestions1234
    [link] [comments]

    How do I enable lite mode in V8?

    Posted: 18 Sep 2019 07:25 AM PDT

    Is there a specific command line flag or is it a compile flag? I don't see anything specific.

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

    What would cause relative paths to resolve to localhost instead of localhost/subdir where the file calling the redirect is in subdir?

    Posted: 18 Sep 2019 06:46 AM PDT

    No idea why, but when I use location.href to change pages or even simple includes like stylesheet and js includes, the path resolves to localhost/thefile instead of localhost/subdir/thefile for some reason. The file I'm calling these from is IN subdir so shouldn't it resolve relative to subdir and not the root localhost dir?

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

    Netbeans Connection Issues - Any Advice Would be Appreciated!

    Posted: 18 Sep 2019 06:38 AM PDT

    I'm new to Netbeans projects, so my knowledge is limited. I'm creating a project in PHP. Right now I'm just trying to run Hello World on a web page. When I run my code, Google Chrome always returns a page stating:

    'This site can't be reached'

    'localhost refused to connect'

    'ERR_CONNECTION_REFUSD'

    I'm doing this project at work. We have Zscaler for web security, and of course firewalls of which I'm unsure of the names. Does anyone know what this problem is stemming from?

    Note: I am not using a proxy server.

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

    TeamCity vs Jenkins for CI

    Posted: 18 Sep 2019 06:10 AM PDT

    Hey guys! I have to choose between Jenkins and TeamCity for our internal project. If I am not mistaken Jenkins has some issues with build queue management (have to deal with 3rd party plugins) and stability issues. What do you think, what cons and pros?

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

    No comments:

    Post a Comment