• Breaking News

    Saturday, August 18, 2018

    ELI5- What is a ground variable and what's a ground term. Example? Ask Programming

    ELI5- What is a ground variable and what's a ground term. Example? Ask Programming


    ELI5- What is a ground variable and what's a ground term. Example?

    Posted: 18 Aug 2018 06:23 PM PDT

    Some of the explanations online are pretty confusing. Can someone ELI5?

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

    C++ libraries

    Posted: 18 Aug 2018 02:57 PM PDT

    I've been coding using python for a while, spoiled by the accessibility of using pip install to get all my libraries in one line of code essentially. Now I'm trying to code in C++ for a school project and I'm trying to get armadillo on my computer to do some linear algebra. I tried to do what's said in the readME file but I can't get it to work. I'm working on windows and I'm trying to use GCC/G++ as my compiler. I know that I have to use -I to include the header files, but there seems to not be any .lib files, what are some steps I can do?

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

    I'm an electrical engineering student who has primarily learned programming through CS100-type courses (i.e. teaching basics in a very isolated environment). I have an idea for a project, and want to branch out, yet the amount I don't know feels overwhelming. Where do I begin?

    Posted: 18 Aug 2018 06:11 PM PDT

    I'm a third year EE student, and I'm hoping to pursue a career that has to do with DSP/algorithm design/data analysis. I have many relevant courses lined up for the spring/fall (Audio Signal Processing, Data Analysis and Pattern Recognition, Applications of Digital Signal Processing Techniques, Digital Video Processing, Computer Vision) but I want to do everything I can to build my understanding in advance of these classes. I'm also hoping to show initiative by having a personal project of my own to tinker with, as well as build familiarity with revision control ahead of time. I have an idea (it has to do with data analysis of Magic: the Gathering cards), but I've tried to distill it down to its functional programming equivalent below.

    My project will likely involve the following components:

    • A large number of .txt files (1000+) filled with newline-delimited strings of information within each one. (i.e. the locations that could contain strings are static and known, but the contents within each location is unknown.)
    • A database of potential strings that these files could contain. (It's a set number of strings, say ~200)
    • A goal of parsing these files to determine which of these 200 possible strings are in each known location within the file.
    • Filling a database with data points for these location/string pairs. (To use plain words, I want to collect the kind of data that looks like "out of 1000 files, location 1 had 10 instances of str1, 22 instances of str2 ... 5 instances of str200" and "location 2 had 12 instances of str1, 20 instances of str2 ..." etc. etc.)
    • Drawing conclusions about possible trends. (i.e. "locations 10-20 had a large number of instances of str20, str21, and str22". So, querying this database with specific searches to try and draw very specific conclusions, then visualizing this data.")

    I'm hoping to use Python/MATLAB because those are primarily the languages that my above courses will use, too. I'm just not sure what areas I'll need to explore to accomplish the above. I feel comfortable with project management (e.g. coming up with a work breakdown structure for this to break it down into individual functions), but databases are foreign to me, so I feel like I'm entering a thick fog far beyond my current knowledge.

    Thank you for reading!!

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

    Is it possible to program for only 5-10 hours a week?

    Posted: 18 Aug 2018 05:13 PM PDT

    I'm currently working on a full stack project. Ive understood how important it is to continually work on this, but I have upcoming responsibilities that will consume approx 60 hours a week.

    Maybe I can set aside weekends or a few hours a night, but I don't think I could put more than 5-10 hours/week into a current full stack project.

    Ive done similar and I feel I wasted time remembering 'what I was doing'. Maybe sprinting on weekends would be best.

    Thoughts? 10 yr programmer.

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

    Just wanted to share this amazing post for any developer that needs insight/help about which road to choose in its career

    Posted: 18 Aug 2018 08:57 AM PDT

    It has both: frontend and backend (and also devops).

    https://github.com/kamranahmedse/developer-roadmap

    submitted by /u/Don-g9
    [link] [comments]

    How to work with binary numbers (C++)

    Posted: 18 Aug 2018 02:48 AM PDT

    As far as I know, to write a number in octal it must begin with 0, and to write it in hexadecimal it must begin with 0x, but what if I want a binary number?

    After a little research I found that there are a few functions and libraries to do this, but as I am working with a 8-bit microcontroller I would prefer a easier and less memory consumming way...

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

    Disabling the UI

    Posted: 18 Aug 2018 01:33 PM PDT

    I have a really silly and insignificant problem, but which has been bothering me for a while.

    Suppose I have a program that has a UI (either text or graphical). Now, this UI is optional, predominantly used for debugging and testing purposes. Basically, the UI allows the user to select and independently run various components of the program. However, there is one main program component, which might need to be run without the UI being displayed (for example, if the program is being run in a batch script).

    The question is this: what is a good way to let users disable the UI?

    Two options that I have seen are:

    1) Command line arguments. Say if the option '-f' is passed to the program, it runs just the main component, and not the UI.

    2) Parameter file passing. The program loads a config or ini file. In that file, there can be a flag (DISABLE_UI = true) that disables the UI.

    What else can one do? And what standards or conventions are there regarding such a specification?

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

    What are some good concepts to learn handling difference conflicts of a text file in a cloud synchronization program.

    Posted: 18 Aug 2018 01:22 PM PDT

    By a cloud synchronization program, I am talking talking about something like Evernote (Or even Dropbox) but in this case I am only looking to deal with text files.

    The main thing I would like to learn is how to handle conflicts of differences in two different text files.

    Say the user is writing a document on their desktop and adds a quick line of text on their phone (Before the phone has a chance to sync with the desktop edits).

    So, now you have a document on the desktop that might look like this:

    ``` My Document

    Hello World ```

    And a document like this on mobile

    ``` My Document

    Apple123 ```

    The desktop and phone will now synchronize these changes and I am wondering what will typically go on behind the scenes to resolve these changes. I believe git uses "diff" for this kind of thing.

    submitted by /u/dougie-io
    [link] [comments]

    Books!?

    Posted: 18 Aug 2018 08:13 AM PDT

    I've never been a book reader...

    I don't have any particular issue with books, I've just always been impartial to the idea of reading them. I'm very much an article reader/video watcher/forum lurker/course do-er.

    I'm forever hearing about this great book and that great book, book here book there, books books books its all in the books!

    I keep finding myself questioning - am I "lacking" specifically due to not reading books?

    I need an answer on stackoverflow... but was it the books that enabled that person to give the answer?

    Am I still a junior because I'm not reading the books?

    The last thing I learned - would that have been learned better from the books?

    Is he tech lead because he reads the books?

    He's a low-level/C/C++ programmer? nice... he must read the books.

    Do books actually contain the exclusive magic knowledge that people claim?

    Or are they just a bit like degrees in the sense that they are sort of outdated/unnecessary?

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

    Any tips for coming up with meaningful names for variables?

    Posted: 18 Aug 2018 11:30 AM PDT

    Aside from the obvious ones sometimes i'll have a problem thinking of a name and i'll put a place holder that i never end up changing since i'm to far in.

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

    Advice for which courses to take?

    Posted: 18 Aug 2018 07:40 AM PDT

    Hi, I'm beginning as a programming student at a local tech college, and I'm looking for advice on which courses to take to start off, of the classes I need.

    There's SQL and Java (overlapping times), there's C# I, Business Management, and an Elective choice of Scripting Technologies, Android, or Microsoft Client.

    I have taken C++ I in the past, although I'm not sure I want to take II because I might want to brush up on it more, plus it's probably not available right now.

    Any advice? Also, I plan to earn certifications on my own like CompTIA ones, even though IT and Programming aren't really related.

    Thanks so much!

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

    I'm interested in opinions about loops and language design

    Posted: 17 Aug 2018 11:28 PM PDT

    I've been programming for nearly 36 years now, and I've used at least a dozen languages, but it's not my job, just a hobby. Mostly I've used C and C++, but the last couple of years I've been using Go quite a bit. Just this week I decided to try writing something in Rust. When it came time to write a loop it got me wondering: why are there multiple keywords for loops? It's a small thing and nothing I really thought about before using Go. If you're unfamiliar, Go uses the for keyword for all loops:

    // infinite for { // while for i <= 3 { // classic counter for i := 9; i >= 0; -- { 

    This isn't a complaint that Rust isn't Go, BTW, though it is my opinion that this is one thing the Go designers got right (for j in 0..6 {OTOH feels superior to how I would have to write it in Go). I'm just curious what other people think and if there is a technical or readability disadvantage to using a single keyword to cover all loops or it's just a subjective thing, or just convention that worked so people stuck with it?

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

    How to store objects with different fields and lists of references to those objects in an SQL database

    Posted: 18 Aug 2018 02:07 AM PDT

    I need to store objects of different types, and not every type has the same fields. From what I've read, you would just create columns for all possible fields and leave all unused fields as null. Is that the correct approach?

    But then who handles checking if the rows are coherent (that the filled and null fields match up with a type)? The db client? Or is there a mechanism in the database itself (SQLite).

    Next, I need to store lists of those records with some additional info (do I use a table for every list?). I couldn't find anything on references or if they exist, so I assume one would assign an id to every record and then store lists of those IDs. Again, is that a good approach?

    I'm also grateful for resources concerning this topic as all I found when searching are guides on how to build queries, not on how to structure the data for the db.

    Thanks!

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

    Help me order a Dominoes pizza using Python

    Posted: 18 Aug 2018 03:25 PM PDT

    I'm trying to follow this Youtube video online. I'm new to python, and the guy on the video skips the simple steps (which I need). I'm on Windows 10 and using the IDLE interpreter. I've downloaded the repo mentioned in the video to my desktop.

    My questions: how can i install pip? how do i run this 'pip install -r requirements.txt'? How can i import the pizzapy library? The 'from pizzapy import *' says 'No module named pizzapy'.

    https://www.youtube.com/watch?v=Nxu6GlDleqA The github repo: https://github.com/Magicjarvis/pizzapi

    submitted by /u/TDN-ThickDickNick
    [link] [comments]

    SSE intrinsic confusion

    Posted: 18 Aug 2018 05:10 AM PDT

    I'm trying to speed up a video filter by rewriting it using SSE intrinsics. For one part, I need to do the following:

    • Read four byte values into an _m128 {bytes[0], bytes[1], bytes[2], bytes[3]} (I use _mm_setr_ps to intialise this _m128)
    • Multiply these bytes by a float each {floats[0], floats[1], floats[2], floats[3]} -> {[bytes[0]×floats[0], bytes[1]×floats[1], ... }
    • Sum these multiplied elements and extract the result to a byte (I use _mm_hadd_ps twice, then _mm_cvt_ss2si)
    • Do the same thing again on the next set of bytes {bytes[1], bytes[2], bytes[3], bytes[4]}

    I'm having trouble working out the best way to update the set of bytes without reading them all in again. I can shift the bits so the _m128 will contain {bytes[1], bytes[2], bytes[3], 0}, but what's the best way to put bytes[4] in the final element after that?

    One idea I had was to preload the next four bytes into another vector {bytes[4], bytes[5], bytes[6], bytes[7]} and shift them in as required, but there are just so many intrinsics that I'm having trouble seeing the wood for the trees. Should I use _mm_move_ss and rotate the second set as well? Or is there a simpler, correct way of doing this that I can't find? Is there an equivalent of _mm_move_ss for just loading/converting a single byte without replacing the rest of the values?

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

    Should i learn codeigniter or nodejs?

    Posted: 18 Aug 2018 07:38 AM PDT

    I am looking for advice because I want to raise my backend skills and productivity. In js i have already worked with frameworks but in php never. I need to make my backend development faster in long term and i know that i can achieve this learning codeigniter or using NPM (in case of nodejs).

    Rigth now:

    • I am Confortable with javascript and PHP
    • I know that PHP is losing popularity and nodejs is gaining
    • nodejs will allow me to focus only on one language for frontend and backend

    What is confusing me is that i know both php and js so i dont know if i would more easily (and faster) learn a php framework or nodejs...

    So based on those topics and on my experience, what would be more viable : learn a php framework (codegniter) or learn nodejs?

    submitted by /u/Don-g9
    [link] [comments]

    Best way to keep on learning python

    Posted: 18 Aug 2018 04:39 AM PDT

    I'm currently doing the python course on code academy, but I want to keep on learning after that, where's the best place to do it, and what methods should I use to learn. I have an understanding of C# since I'm learning it at school.

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

    1 comment: