• Breaking News

    Wednesday, May 8, 2019

    How can I explain to my new employer that their spaghetti architecture needs to be changed? Ask Programming

    How can I explain to my new employer that their spaghetti architecture needs to be changed? Ask Programming


    How can I explain to my new employer that their spaghetti architecture needs to be changed?

    Posted: 08 May 2019 02:10 PM PDT

    So going into a new job, they said that they used to have a monolith, but have since split it up into several micro-services. But now that I've actually gotten a look at it, I see that they keep all the data-access and mediator code in one shared library, then include that in every single one of their services; ui and device back-ends included. So every service that wants to do something will directly contact the databases or external integrations of the other services. It seems like all they did was pull the business logic out into services so that they can scale those appropriately.

    I know this is wrong; it's a big ball of spaghetti. From all my years of learning about micro-services, I know that services should communicate with each other using their API or events, and not directly connecting with the internals of other services. My boss says he's open to change, but only if I can explain to him how the aforementioned architecture is better. How can I do that? Blog posts, conference videos, or written explanations would all be helpful. Thanks.

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

    If a computer does a million processes per second, how come for(int i = 0; i < 1000000; i++) {cout <<i;} takes forever?

    Posted: 08 May 2019 06:50 PM PDT

    for (int i = 0; i < 1000000; i ++) { cout << i << endl; }

    As the code above in a compiler shows, it does not instantly compute everything in a second, but rather, it takes around 2-3 minutes, thus equating to ~6666 calculations per second. Why the discrepancy?

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

    What is the ELI5 explanation for how GZIP compresses files?

    Posted: 08 May 2019 04:37 AM PDT

    Whats a music software as sim of electric parts including transistor (3 electrodes, 1 controls resistance between the other 2), capacitor, inductor, etc?

    Posted: 08 May 2019 09:23 PM PDT

    Im not trying to be pedantic like doing assembly language instead of a higher level language. I think small coimbos of basic electric parts are a good model of music.

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

    Can you use the Braintree API to send money from your account to a user account?

    Posted: 08 May 2019 09:22 PM PDT

    Shopping cart iFrame plug ins

    Posted: 08 May 2019 08:45 PM PDT

    Who has a pretty simple shopping cart plug in that I can IFrame into my web page?

    The client has a square account, but said she could do anything really. I mentioned paypal, but not sure if that's the right one.

    Any recommendations?

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

    What should I expect going into this field?

    Posted: 08 May 2019 08:25 PM PDT

    I started out self-learning C++. I have a few books, a couple good ones by Stroustrup, a dumb "without fear" book, a couple "learn in x days" books.

    I'm 22 and I've been putting off really biting into it for (insert 21st century problem here).

    I play videogames like crazy, and eventually want to design my own games. At the same time, I want to know the ins and outs of all things related to computers. For example, if needed, I could build a company's architecture from the ground up, take it online, satellite integration, security. The whole deal.

    So my question to you more knowledgeable out there, what are the limitations in a goal like this?

    What college degrees would I end up with if I chose to learn the ropes in college?

    Is college even the best bet? Will I learn everything I need to know if I struggle teaching myself?

    What should my focus be in? Would I need to only be in the security field, or only be in some subfield of game design due to the amount of college required?

    I realize how ambitious this is, and that is why I would like a real idea of what I'm up against in the software design field. I've realized recently the limitations in any one person.

    My options in the near future are go full force into college, or I'll just do the electrical tradesman apprenticeship.

    Any advice from students themselves and veterans alike would be appreciated, down to the working conditions, and 20 years down the line.

    Thank you for reading

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

    Understanding Algorithms

    Posted: 08 May 2019 01:42 PM PDT

    Hello everyone,

    I'm trying to figure out how to solve algorithm problems (using Javascript) and I'm having a difficult time wrapping my head around some of them. I'm usually able to solve medium-hard problems (on leetcode) using brute force, but solving I usually never get the dynamic answer.

    Even after looking at the solutions, I'm usually dumbfounded as to how they came up with the solution.

    Take this problem as an example:

    Longest Palindromic Substring

    Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.

    Example 1:

    Input: "babad" Output: "bab" Note: "aba" is also a valid answer.

    The correct answer:

    var longestPalindrome = function(s) {

    if(!s || s.length <= 1) {

    return s

    }

    let longest = s.substring(0, 1)

    for(let i = 0; i < s.length; i++) {

    let temp = expand(s, i, i)

    if(temp.length > longest.length) {

    longest = temp

    }

    temp = expand(s, i, i + 1)

    if(temp.length > longest.length) {

    longest = temp

    }

    }

    return longest

    };

    const expand = (s, begin, end) => {

    while(begin >= 0 && end <= s.length - 1 && s[begin] === s[end]) {

    begin--

    end++

    }

    return s.substring(begin + 1, end)

    }

    Can anyone walk me through this? Or what is the best way to tackle these problems? Write it out first? break it into pieces?

    Any help would be appreciated.

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

    which languages for human readable and importable structs

    Posted: 08 May 2019 07:23 PM PDT

    I want to write a generic program that allows users to write the needed internal structs in an external file. Basically, the program reads an input file and decodes the binary information inside of it. But that binary information can be structured differently depending on the protocol. For instance, the file can contain a protocol defined as 100 byte messages, with first 4 bytes an unsigned int, next 8 bytes a double and the rest of the message a string. This protocol definition needs to be provided by the user.

    The requirement is that the structs defined by the user are in a file that should be human readable and editable by non programmers. I think this is called a markup language. And it should be supported by the programming language such that it can read it in and convert it to internal structs for use in function calls. Python and Json or yaml comes to mind. So what programming language and markup language would you recommend?

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

    When to use upcasting and downcasting in C#?

    Posted: 08 May 2019 06:45 PM PDT

    I'm just having trouble seeing when to use it as I was never given a solid example.

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

    Learning language with Netflix chrome extension

    Posted: 08 May 2019 06:24 PM PDT

    Has anyone used this chrome extension? I'd like to know if anyone can manage to download the captions - both original and translated subtitles? It's great for language practice, and I'd like to make flashcards out the of the sentences.

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

    What thing do you believe that at most 10% of other programmers agree with, and why do you believe it?

    Posted: 08 May 2019 01:52 PM PDT

    What's Best? Cloud Storage, cyber security, app dev, big data, enterprise middleware or software development?

    Posted: 08 May 2019 05:32 PM PDT

    Hi,

    I'm training with a company next month that specialise in the areas listed in the title. Since they have a broad range of specialisations I need to essentially decide which is best to go into. Although I have provided very little information I would like your general thoughts on which is the most promising industry in terms of Pay, Career advancement, Job options, interesting work etc.

    Alternatively, what research would you suggest I do in order to make a more informed decision and can you provide any resources?

    Thanks.

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

    TI Basic storing strings to a matrix? Trying to write program for exam

    Posted: 08 May 2019 05:30 PM PDT

    Working on a TI-84CE program for the AP Chem exam tomorrow, thought I'd write a program that'd help me study as I write and help me out on the exam since we're allowed to use them on half of it. Trying to store strings in a matrix since it'd theoretically be the easiest way to find the name of a molecular shape based on bonding and nonbonding electron pair numbers. However, it seems I can't store strings in a matrix and can't find any info on it. Is there a way to do this or an easy alternative? If there's no easy alternative, that's fine, I'll just move on and keep studying other topics for tomorrow

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

    Wrote/writing an extension to open-source software for my workplace that barely respects me, but now wants me to just give it to them for free. What do?

    Posted: 08 May 2019 09:54 AM PDT

    I work for a small computer refurbishment charity, and a while back I wrote a script (edit: in my own time, on my own laptop, and not explicitly at their request) that uses Buildroot to load up, run, and log the output of a GPL2 application, and this has enabled us to get contracts with companies (well, one so far, with another one on the horizon) and acquire more donated hardware.

    [Long but mostly-relevant context:]

    The company doesn't make much money, but does make enough to support itself. They pay me minimum wage for a few hours' work each day, where my responsibilities are limited to repairing and refurbishing computers. Nothing in my contract relates to software development, nor have I signed any non-disclosure or non-compete agreements. I also have Asperger's, and have trouble conceptualizing "money" or "what I deserve" in general. I am not inexperienced with software development, but struggle with life skills (especially self-confidence & assertiveness) and am underemployed (and under-used) as a result.

    I'm currently working on a considerable extension to the software that will increase the throughput, reliability, and practicality of the whole project, but it's taking a lot of work, and not only can I not ever seem to find time at work to spend on developing it without being interrupted by one of the two other (senior) techs giving me their work to do or getting me to solve their problems, there isn't even anywhere that I can sit down and use my laptop... although there *would* be if the one older guy hadn't decided to move from one office to another (last year) while leaving the first one piled floor-to-ceiling with junk and yelling at me any time I try to clean it up.

    Any time I suggest anything to this company, I either get shut down for unexplained reasons, told that someone else is already planning to do something far less practical/plausible/logical, or told to go ahead and implement the idea... in my spare time (effectively.)

    Last year, I spent quite a bit of effort re-implementing a section of the company's website so that it could actually be improved upon from the locked-down mess that is Weebly, and made an identical-looking page that could take the output of a form and process the data properly, produce both PDF and CSV files from it, then send a confirmation email and pass the files along to multiple recipients. This took me a little over a month (during which I felt pressured to take time away from being with the one and only real girlfriend I've ever had... who very soon afterwards moved away), and it was a solution to the main complaint that another employee in our second office had about his workload. I had been suggesting doing so for years, and one month after they finally relented and gave me access to the site to try to port it elsewhere, I was told to "shelve" my work after having already completed the part that I just described... and then a *year* later, the company's website gets replaced (with my help required for the transition) with one based on WordPress (like I had been suggesting) that was a poorly-rendered copy of the original, made by a third-party company whose own website is full of with amateur mistakes. How much and for how long they were paid to do this, I don't know... but I was recently told that my one-month's work during my free time was "taking too long", and that's why we now have this shitty copy that still doesn't do the important form processing that I had already completed.

    All that without so much as an apology, or even an acknowledgement of the indignity. And that asshat's office is still cluttered AF, despite my having organized the crap into boxes, repeatedly (several weeks apart) asked him to go through it to see what should actually be kept, and mentioned it to the manager several times.

    [/context (sorry)]

    Now I'm being asked for a copy of the software that I wrote (which is mostly just a Buildroot environment + a Bash script or two, although it took quite a bit of effort to get working properly) so that it can be replicated easily at our other office's location, as well as being told to 'hurry up and finish' the improved version of it (adding networking, headless & hot-pluggable sub-units, and centralized logging). However, I still haven't actually been paid a penny for all this (nor given much in the way of additional respect), and while part of that is due to my A.D.D.-style workflow and not logging my hours outside of the shop itself, I'm still getting the distinct impression that, wittingly or unwittingly, I'm being seriously taken advantage of.

    So, uh... any suggestions? I have zero instincts for dealing with *any* part of the 'human' side of all this. ._.

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

    Anyone use Codenvy, could use some desperate help

    Posted: 08 May 2019 03:35 PM PDT

    I'm at the end of my semester and my laptop decided that it doesn't want to charge any more, so I no longer have a computer to program on, which is partly why I'm posting on such a new account because I can't remember my password, nor does my resetting it work because apparently I don't know the email...

    I've read that codenvy is an online IDE, and figured that would be the only option I have right now. I'm trying to build my program on that, but I have no idea how to actually test it. I've seen some videos where their programs have a "Build" button, but that is no where to be seen on mine. There is a run button, but all it prints out is what's in the new custom command line section.

    Does anyone know anything about how to actually use Codenvy?

    Also, I'm still really new to programming, so I won't know a lot of technical stuff.

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

    Has anyone here dealt with DHIS2?

    Posted: 08 May 2019 02:40 PM PDT

    DHIS is an open source software platform for reporting, analysis and dissemination of data for all health programs, developed by the Health Information Systems Programme (HISP)

    I want to display the charts and tabular data from a dhis2 user account unto a web page. I read the web api documentation and tried to use the plugins but they dont work. Anyone have a solution to this?

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

    How do I add and remove elements from an observable list? Event handler.

    Posted: 08 May 2019 02:34 PM PDT

    I'm using Java.

    Let's say I got two lists:

    "carsAvailable" and "carsSelected", "carsAvailable" has an add button which is supposed to add the highlighted car to "carsSelected" and be removed from "carsAvailable".

    "carsSelected" has a remove button and is supposed to remove the highlighted car and allow it to appear again back in the "carsAvailable".

    How do I do this? So far I've created the necessary lists, buttons and overall structure of the gui but I just don't know how to work out the event handler.

    Any help would be great thanks.

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

    Why do pointers count memory in multiples of 8 bits?

    Posted: 08 May 2019 01:31 PM PDT

    The smallest unit of digital memory is the bit.

    And the smallest unit of addressable memory is 32 or 64 bits on modern processors.

    But low-level pointer arithmetic still works with multiples of 8 bits (a 'byte').

    Why 8 bits?

    submitted by /u/can-i-haz-a-new-name
    [link] [comments]

    How can I make my computer do this?

    Posted: 08 May 2019 12:58 PM PDT

    First, I apologize for my English and my lack of knowledge about programming. I know next to nothing about it (I can understand some java and httml and why they work, but that's it). However I think that it's appropriate to define programming as: The way in which you make a machine act in a way that you like and do what you want it to do (if that is not correct, please, tell me how do you personally define it). Now, with this in consideration, I have the next problem that I would like to solve. My PC runs two screens. Sometimes I need the two windows to change positions between themselves. This means, I have a window in the screen on the right that I need to have on the left and vice-versa. To do this, I drag both windows, but i would like a more efficient way to do this. I can also obtain the same result if I press. Winkey+shift+arrow to side (can be any, since there are only 2 screens) Then hold alt and press tab once then again Winkey+shift+arrow to side This accomplish exactly what I want, but I would like for it to be more efficient. How can I make my PC do this with just a single command?

    Also relevant: A few years ago a had a somewhat similar problem with the sound output. In order to change the output to the screen or to the headphones I had to go to sounds, then to another window and then select the output. I wanted to make this easier and fortunately, I found "SoundSwitch" which makes the switch by pressing alt+f11. I would need something like this to exchange the windows in the screen, that is, make them switch places using only a very simple key command. How can I make this happen? Either by using a program that can make this (I don't know of any, if you do, please, recommend them to me) or by programming (if so, tell me how this would work, so I can start learning what I need to make it).

    Thank you very much in advance. I'm looking forward to reading your responses.

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

    Applied for a Programming analyst job, and have to take an online quiz to see where I stand with all that I know.

    Posted: 08 May 2019 12:39 PM PDT

    Has anyone taken anything like this before? I'm just about to graduate, and this will be my first programming based role. Overlooking the application, the applicant must know: C#, python, java, C++, and a few more.

    If you've taken anything like this before, could you give me a few pointers as to what I should know before going into this, thanks!

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

    What function, which takes at most .01 second on an average computer, should be used for hashing small passwords?

    Posted: 08 May 2019 11:52 AM PDT

    Recovering lost files?

    Posted: 08 May 2019 10:42 AM PDT

    Sorry if this is the wrong place to ask just not sure where to go...

    My Mac wouldn't start at all, I would get to the apple logo and it would boot halfway. all options I found online wouldn't work.

    Couldn't even reinstall the OS. The only thing i can do was erase the partition and then I was able to reinstall.

    I have used programs to try to recover my Java and git file but i had no luck. Is there anyway I can recover these files? I tried photo rec but it's not clear if any of this is stored inside.

    I didn't push this info to github because I was asked not too for other reasons. Now this is lost and I spent a lot of time on it

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

    Trouble understanding function pointers in a function prototype

    Posted: 08 May 2019 10:23 AM PDT

    I'm trying to learn about pthreads, and the prototype of pthread_create,

     int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg); 

    Specifically, I don't understand the third parameter. Could someone explain to me what each component of this parameter means?

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

    No comments:

    Post a Comment