• Breaking News

    Thursday, June 11, 2020

    What is a silo? Ask Programming

    What is a silo? Ask Programming


    What is a silo?

    Posted: 11 Jun 2020 10:57 AM PDT

    We're using kafka at work, and I overheard some people talk about silos. Specifically, reading data from a silo, sending data to a silo, etc..

    What exactly is one? When I search for the term "silo", it's very hard to find anything programming related. When I look for "kafka silo", I find endless links to "No more silos".

    The apache kafka book: https://www.confluent.io/resources/kafka-the-definitive-guide/
    doesn't even mention the term "silo". I'm so confused. Any help is much appreciated.

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

    [C++] Confused about how returning references works

    Posted: 11 Jun 2020 07:35 PM PDT

    I am familiar with C and trying to learn C++ but I don't think I quite understand references.

    say I have some c++ code:

    int& function1() { int x = 10; int& y = x; return y; } int main() { int& a = function1(); int b = function1(); std::cout << a << std::endl; std::cout << b << std::endl; return 0; } 

    This code compiles and runs without error, printing 10 both times. I have a few questions.

    1. function1 returns a reference, right? So what is it a reference to? x? But x is a local variable that doesn't exist after the function returns. So how can it return a reference to x?
    2. The type of b is int while the return type of function1 is int&. I'm a bit confused how this works. If the function returns a reference, how can it be assigned to something that isn't a reference?
    submitted by /u/greenpepperpasta
    [link] [comments]

    Is T(n-1) + o(1) same as T(n-1) + 1?

    Posted: 11 Jun 2020 06:53 PM PDT

    For recurrence runtime is is o(1) same as 1?

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

    Worried this code might be perceived as bad

    Posted: 11 Jun 2020 07:17 PM PDT

    I've thrown some stuff on my resume, and I have an inkling that business software oriented people will perceive this code as bad.

    Mainly because way too many people suggest that your code has to be under a magical limit of 1.000 lines (or some other arbitrary number). (There's 4 other partial classes that are much smaller that deal with strings/memory/blittables etc). All in all this class is somewhere around 1200 lines.

    https://pastebin.com/Q8p3WBuP

    Let me emphasize that this code is part of a library that focuses on real-time networking specifically aimed at game development.

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

    Are there any tutorials on how to code a Python Kahoot bot?

    Posted: 11 Jun 2020 09:26 PM PDT

    Searched a lot, but cant seem to find any good tutorials

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

    Any tips for moving from Java to JavaScript/NodeJS?

    Posted: 11 Jun 2020 11:08 AM PDT

    Hey folks, Through my degree I mainly worked with Java, with a pretty heavy emphasis on object oriented design patterns.

    I've recently started a junior dev job as a NodeJS dev. I've used JS and Python before (self-taught), but everything I write feels really messy and unstructured compared to my Java code.

    Anyone got suggestions to improve/any resources?

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

    Is Assembly or C faster in practice?

    Posted: 11 Jun 2020 02:42 AM PDT

    Sure, you can do a lot of optimalisations if you code directly in Assembly, but gcc does a lot of optimalisations automagically. So that got me wondering, who generally does it the best? A human or a compiler?

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

    What are some simple programs I can make quickly

    Posted: 11 Jun 2020 07:31 PM PDT

    Basically looking to get something going on fiverr and need a few suggestions to use as examples lol

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

    All Axios requests to Back End aborted

    Posted: 11 Jun 2020 03:38 PM PDT

    Hi all,

    I am creating a web site using React for the front end and Spring Boot as a back end, but I'm having a bit of trouble when it comes to communication between the two. My front end is running in a Docker container on port 8080 and my back end is running on a Docker container on port 8081. Whenever I send a POST request with user credentials to localhost:8081/user/login, I always see this message from axios

    Error: "Request aborted" createError createError.js:16 handleAbort xhr.js:73 index.js:1 e index.js:1 handleLogin Login.js:27 

    In the back end, I have allowed Cross Origin requests from *. In the front end I have configured an axios config with baseURL: http://localhost:8081 and headers "Access-Control-Allow-Origin": "*". Using fetch, I was able to POST to the endpoint, but still received no data back and didn't see any logs from my Spring Boot Docker Container.
    Here is the request I'm sending

    // Make login request axios .post("/auth/login", creds) .then(data => { console.log(data); }) .catch(error => console.error(error)); 

    where creds is an object of the form

    { "email": "xxx", "password": "xxx" } 

    What else should I be doing here? Thanks, DatZ-

    EDIT: I should add that I am able to interact with all of my endpoints from my python scripts and POSTman, I just can't seem to get it working from the browser.

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

    Why is OOP so hated?

    Posted: 11 Jun 2020 12:57 PM PDT

    I see it every where, and I cannot understand why it gets so much hate.

    Is it that bad? Or are those assumptions just like the 'javascript is bad' meme

    EDIT:

    Sorry for not answering you guys, there were more comments than I thought it would, and I'm always bad at answering comments :s. But I get it now, almost all answers were valid except one or two.. Depends on what you're doing and how the language behaves to OOP. Thank you all!

    EDIT 2:

    Since I don't want to be seen as an asshole by not answering your comments, I'm sure to give you all the upvote you deserve, that is, if only your comment is about my question and not just joking around. Again, thank you all who answered, I appreciate the time you spent for getting me informed.

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

    How do you visualize an object?

    Posted: 11 Jun 2020 06:53 PM PDT

    How to organize and explain your features to your developer team?

    Posted: 11 Jun 2020 06:40 PM PDT

    Hello. I am wondering if there is any process or diagram that can be useful to explain my mobile app to my developer team.
    My tries:
    I am currently using Onenote but I am having trouble organizing and communicating with my team my ideas, all my notebook is a mess and sometimes I create a new page with an explanation and then I realize its already been explained by me a few days back.

    I try flowcharts but some features cannot be explained doing this.

    Phone or texts are useful but sometimes I forget what I did told my team and make a mess.

    My question is:

    There is a way or a process to successfully communicate my developer team the features? Some kind of format or special diagram?

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

    What is the best database to store videos on in Android Studio?

    Posted: 11 Jun 2020 06:37 PM PDT

    Would you work on open source projects in exchange for room and board?

    Posted: 11 Jun 2020 06:08 PM PDT

    Let's say it has to be a FOSS project of your choosing. Not just your own little pet project that maybe three other people might find useful though. And you wouldn't be living in a palace. Probably something like a share house or on a farm, whichever you prefer.

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

    Does anyone know any free software on ChromeOS? I want to try programming out before getting a separate machine.

    Posted: 11 Jun 2020 04:55 PM PDT

    How do you add something to the Windows-Rightclick-Dropdown-Menu

    Posted: 11 Jun 2020 04:05 PM PDT

    I dont know how it is called exactly.
    Some programs add stuff there. For example you can create a new WinRAR-Archive by right-clicking and going to new.

    How can you add stuff there?

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

    Is consciousness recursive?

    Posted: 11 Jun 2020 02:27 PM PDT

    I'm not sure where the best place to post this would be. I'm a budding programmer and thoroughly enjoying the process so far. I enjoy viewing this world as a collection of information and wondering at the structure. Today I encountered the idea that consciousness is recursive in nature. In other words, is the structure of consciousness inverted, in the sense that its only "direction" is further into itself? I find it fascinating.

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

    Interview Questions

    Posted: 11 Jun 2020 02:20 PM PDT

    I have my first tech interview Monday for an apprenticeship placement with LaunchCode. I'm sure they'll ask me some questions about my interests and background but I'm concentrating more on the whiteboard part of the interview. I recently got my BS in CS and I'm pretty confident in my coding ability (as a beginner at least) but I also have testing anxiety and I'm nervous I'll get caught with my pants down on something simple. So, what are some generic examples I can practice/refresh on this weekend to prepare? I've thought of like finding primes, fibonacci, and fizzbuzz. Any suggestions on other things to practice would be appreciated.

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

    Are long random urls considered safe?

    Posted: 11 Jun 2020 02:15 PM PDT

    I mean I know that many companies do this eg. AWS S3/Googl/etc... where you have a stupidly long ur l and I think you can have them not password protected.

    If you were generating some url thing like:

    example.com/user/alfksjfsdf-34-394lakdjf-2343

    It's "theoreticaly" hard to enumerate that like incrementing ids but if you then told a user "btw you can password protect this page" then it brings up the question "was it not secure before?" idk... weird thought.

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

    What's a good reason to change job and what's a good reason to stay at a job?

    Posted: 11 Jun 2020 12:46 PM PDT

    Like for many software engineers the head hunting never ends and sometimes it's for substantially more money. When I started out I switched job every year or so to get a huge pay raise. Then I found a job where I like the people, there is very little pressure or stress, the hours are very flexible and I have a high degree of liberty for my projects. The downside is I could be making more money somewhere else and the raises are set company wide instead of by merit. There is also no chance of me becoming an architect or even a lead since all the roles are stable and there are others with more seniority.

    Nevertheless most people there have been there 5-15 years because it's great. Should I do the same? I've heard it's a career killer to stay at the same place too long. Technology wise we are up to date so I don't think my knowledge will fall behind.

    What made you realise it's worth staying and at what point is it a good idea to leave?

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

    Help with starting a project

    Posted: 11 Jun 2020 12:23 PM PDT

    I have an idea of a new programming project in my head, but really not sure how to get this thing started. I want to create a tool to help track course grades for school, and I want to be able to send the tool to my friends so they can use it. I'm on macOS, but I want it to be able to run on both macOS and Windows. Originally, I thought of working with python to create a GUI, but ran into some roadblocks setting up the GUI as I don't know much about python GUIs. Now I am thinking of working with Java to create the GUI, using WindowBuilder or JFrame.

    Once I finish the project would I be able to export it to a .app and a .exe with Java? I'm not really sure how app development from scratch works. I need a 'save' feature that probably just writes to a .csv to hold the data, so I want to be able to load in a csv/ save any data to the app.

    Could anyone point me in the right direction how I would implement this?

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

    Should I use Excel + VBA or write a WPF-App in .Net Core

    Posted: 11 Jun 2020 12:13 PM PDT

    We have a lot of old Spreadsheets at work that do some basic calculations, where you enter 2-10 values and the spreadsheet does the rest. I am now tasked with making these calculations foolproof, so that nobody can tinker in these spreadsheets and possibly break anything. Also the input of the data should be made easier, preferably in a form.

    Is it better to do this in Excel (with VBA?) or would it be a good alternative to implement these calculations in C# and bundle all those calculations in some kind of Toolbox.exe for easier use.

    I'm not talking about what's easier, but what would yield the better result.

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

    Graph design

    Posted: 11 Jun 2020 11:13 AM PDT

    Hi,

    I'm completely new to this field. I have some data currently in json (data from a personal health app) that I'd like to display in graphs and I had a couple of questions:

    Probably the better way to store this as time goes on and data increases, would be sqlite or mysql?

    what library would you suggest I could use to make those graphs nicely dynamic/interactive ? Any examples would be appreciated!

    I have some experience in c#/python, but my guts tell me js might be the way to go..right...wrong?

    Thanks for your input

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

    No comments:

    Post a Comment