• Breaking News

    Tuesday, August 27, 2019

    Why is javascript so weird? Is this the best we got? Will it be replaced some time? Halp Ask Programming

    Why is javascript so weird? Is this the best we got? Will it be replaced some time? Halp Ask Programming


    Why is javascript so weird? Is this the best we got? Will it be replaced some time? Halp

    Posted: 27 Aug 2019 05:20 AM PDT

    Hi, I am a backend dev who recently had to start learning frontend. Our stack is kotlin and react.

    And I absolutely hate it. Theres no rules, any thing you want is perfectly fine. And theres no type checking so you just magically have to know the properties of everything unless you wanna consolelog it all to see what it contains.

    Add to that, even inside a component you have no clue what anything is. Its just written what you hope to receive, theres no validation that is what actually happens. Then theres the 16 layers of matryoshka dolls that take and send things further in to nested components. Wanna change a small thing in one component? Sure, just update 3 fields in 16 files. What?

    Why is it like this? How have we not moved onto something better? I know facebook made this, so there has to be a reason... But the experience shifting from backend to frontend is horrific. It feels like literally going 25 years back in time, with the goals and expectations of today.

    Hell, even the IDE is fighting me. What is this eslint bullshit that keeps screaming like an overly triggered autist about spaces after curly brackets and other nonsensical stuff that should be automatically dealt with by code formatting hotkeys?? Then there is the fact code completion suggestions are crazy. Everything is suggested everywhere, which of course makes everything worthless. It's like the environment (IntelliJ Idea) is made to annoy and enfuriate developers.

    Ok, rant over. Obviously i know nothing and thats why things seem foreign and difficult. It feels like all niceties and restrictions I'm used to doesn't matter, and I am allowed to make whatever errors I can think of. To those of you who are experienced, does it actually feel like a modern and innovative language, or are you just artisans at wrangling good products out of bad tools? Does it get easier? Understanding monads was orders of magnitude easier than this lovecraftian hellscape of divs and forms and reducers and actions and sagas and how they work together.

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

    Need help remembering a video

    Posted: 27 Aug 2019 09:55 PM PDT

    I remember watching a video on YouTube years ago regarding a demo/presentation of this command line presentation tool he coded. The presentation was done in the command line and each slide has a 30 seconds (or so) limit. Once 30 seconds is up, the characters in the slide start to disappear one at a time until he skips to the next slide.

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

    What can a programmer (Python) do for the environment? (Crossposted from r/EnviroAction. Even if I know it is not a strictly programming issue, please do not remove, is important for all of us)

    Posted: 27 Aug 2019 02:03 PM PDT

    Can you do PROPERTY inheritance with Rust?

    Posted: 27 Aug 2019 09:14 AM PDT

    Disclaimer, I am a Rust newbie.

    I know that Rust does trait composition instead of inheritance, I am perfectly fine with this, it works fantastically well with methods. However, there is not a single word about how a struct can extend on another struct properties.

    ``` struct A { label: String, }

    struct B { label: String, } ``` Is there any way I can avoid repeating the label definition by saying A and B extend C, thus they both have C's 'label' property?

    Traits but for properties basically. Is there a pattern that can give me this result?

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

    Raptor OOP overloaded Constructors

    Posted: 27 Aug 2019 05:53 PM PDT

    Hello everyone,

    I tried finding the answer to this specific question pertaining to Raptor and OOP., but it seems like Raptor is so obscure that it doesn't have it own user base. I know how to create objects in Raptor, but I need to know how to utilize the constructors that have parameters. In C++ I can do it this way:

    class Box { private: string color; double weight; public: Box(aColor,aWeight) { color = aColor; weight = aWeight; } }; Box dice("blue", 1.58); 

    In this example, I create a class "Box" the constructor to accept parameters. I can't find anything that would allow me to do the same in Raptor...Please help..

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

    I like coding small games but I dislike today's engines. What's a way forward?

    Posted: 27 Aug 2019 08:53 PM PDT

    I've been programming for about 16 years now. I recently graduated from university with a B.S. in Computer Science and subsequently put my degree to good use working as a web developer. I've been doing my work. Now I regret to say that I find almost no enjoyment in my work at all.

    Honestly, I'm not in the line of work that I wanted to be in. I don't particularly like webdev, especially when it's the Wordpress stuff I have to deal with at my job. I wanted to do something else.

    I first got into computers because I wanted to make games. That was my calling. I loved the feeling of making something out of almost nothing, and I've got hundreds of fond memories of getting home from high school and sliding up to my desk so I could code up little Zork-like adventure for my friends to play. And then I'd make a 2D platformer using C/SDL or Pygame, and send it to my family members. It was a blast. I really loved it. And now, I'm in a really weird position.

    I'm an adult, and I'm trying to return to gamedev as a hobby. I actually spent a year working with Unity, and I ended up using it for my capstone project at university. I also tried Unreal Engine for a bit. Unfortunately, I experienced a pretty consistent thing from both of these solutions: I did not enjoy myself. I don't know why. All I know is that these ways of making games were utterly unfulfilling to me.

    When I tried to go back to a more antique setup using C and the new SDL2, it was honestly pretty fun. I liked it. But it's ridiculous how much I'm giving up with that setup. My friends are now spread across several operating systems, including Windows, Mac, and Linux. Some of them just use phones. With C, I can't reach them at all. Pygame (as a solution) is not an option either, because it lacks automatic hardware-accelerated 2D graphics and also is not easily portable.

    So... I'm left with no direction. I don't see a way forward.

    I've heard the phrase "there's no silver bullet." That's where I stand right now. Am I missing something?

    I want to make small games using my text editor and MS Paint. I want modern amenities like accelerated graphics, easy portability, and ease of development. Is there any hope for me? EDIT: wording

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

    Java or C# ?

    Posted: 27 Aug 2019 02:44 PM PDT

    I'm planning on applying for the Software Development BS program at WGU. I live in Austin, Texas and hope to get a tech job here once I finish the program. Is there a preferred language to use amongst Austin tech companies?

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

    Changed a vector of pointers to a vector of objects, and now it crashes. Why? (C++)

    Posted: 27 Aug 2019 02:08 PM PDT

    I have a class (A) and it contains a vector of pointers to another class (B). In the constructor for A, I push_back a new instance of B. This works fine.

    But I wondered if I could do away with using pointers to instances of B, and just use instances directly. So instead of

    std::vector<B*> my_vec; // in A's definition ... my_vec.push_back(new B()); // in A's constructor 

    I tried:

    std::vector<B> my_vec; // in A's definition ... my_vec.push_back(B()); // in A's constructor 

    This initially works, but as soon as A's constructor is finished (in fact, as soon as push_back is done, I think), the new object I created seems to go out of scope and its destructor is called. Which seems reasonable enough, but I would have thought that by pushing it to the vector it would be "safe" (copied, perhaps?).

    Is there a way to make std::vector<B> work or do I always have to use pointers?

    My main motivation was to shift the work of deleting to my_vec.pop_back() instead of having to delete the instance myself and then pop the pointers off the vector.

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

    Why is my Terminal slow when changing directories?

    Posted: 27 Aug 2019 02:07 PM PDT

    This wasn't always the case. Terminal takes up to 5 seconds to change directories. Even if I install another terminal program on my MacBook, it is still extremely slow.

    Ive tried:

    1. Freeing up plenty of space on my Mac
    2. Clearing all log files
    3. Removing background transparency in Terminal settings
    4. Reverting to default profile settings under Terminal>Preferences>Profiles
    submitted by /u/HighResolutionBot
    [link] [comments]

    Animosity towards front-end?

    Posted: 27 Aug 2019 01:54 PM PDT

    Is it just me, or do some back-end devs have a lot of animosity towards front-end?

    I have been learning a few programming languages for a while and been around a lot of devs who specialize in different things but I've noticed that some (not all) back-end devs sometimes seem to be a bit pretentious about code in general and see front-end as being not as useful and "second class". A lot of times it feels like they are insinuating that learning front end is useless.

    Is this just more of a friendly rivalry type thing or just jerks being jerks?

    Or is there a certain disdain towards front-end that a lot of back-end folks have?

    Just curious to hear your thoughts.

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

    Recently Hired in DevOps despite having electrical engineering background

    Posted: 27 Aug 2019 12:56 PM PDT

    Hello all. I start working as a beginner software developer in a DevOps position in two weeks. I am a fresh college graduate, but my degree was in electrical engineering. Before starting real work they have us go through a three month training, but I want to get ahead before hand. I've got a copy of the DevOps handbook but am looking for other material/concepts to read/learn.

    My background in coding is focused more on low level and embedded systems so if there are any languages that I should look into that would be great too.

    Thanks!

    submitted by /u/__Rusty-Shackleford_
    [link] [comments]

    Help a physician develop a tool to make his daily typing routine more efficient

    Posted: 27 Aug 2019 12:51 PM PDT

    Hi. I'm a physician and my daily routine includes a lot of typing. Especially typing of patients' examinations. Each examination is constructed on the same basis (temporal order). For example, the things I type looks like this:

    "Patient is calm/agitated/in pain, breath fast/slow, airways are clear/obstructed, abdomen is tender/non-tender, etc, etc, etc...".

    Just without the slashes (choose one option for each case in the example above)

    Obviously in reality it's a bit more complicated than this example, there are more options to choose from, and sometime I need to add "free text", include categories I don't include usually, etc, but the order of the examination is the same (for example let's say: 1. general_status 2. head 3. eyes … n. lower limbs

    Instead of manually typing my examinations into the computer each time, I would like to create a tool or find a way to facilitate the process. I was thinking on 2 main roads:

    1. Creating it from scratch. I assume I'd have to learn html, css, and js mainly. I would create a website or an app, something I will be able to access from the pc at work (a challenge in it self). In this app/web page I will be able to choose an item for each part of the exam, plus the ability to enter free text (and to have it saved for future use and easy access). It can be done perhaps in the form of a drop down menu or tick boxes. The out put would be a text composted of constant words and in between the parameters (variables) I chose from my pre-organized list (that I can edit). I would then be able to copy the text out in one click, and would paste it in the hospital software we work it.

    2. Creating a table in excel (or something similar) and applying the above idea somehow. I'm not sure if it is entirely possible in excel, and if so, it would certainly be less aesthetic than what I can design on my own, developing it 'from scratch'.

    I would like to ask what do you think? Maybe there is a third better option? What Should I learn? Where should I start?

    I have a simple and basic understanding about coding and algorithms, but haven't actually wrote any significant code in the last 10 years or more.

    Appreciate a lot any help.

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

    Beginner. Simplist way to post url parameters to database?

    Posted: 27 Aug 2019 06:35 AM PDT

    I'm not sure if my terminology is correct and I'm swimming in mission creep and choking on info overload.

    Ive been researching database theory be and programing for about 6 months trying to find solutions for my business. Telemarketing B2B advertising sales.

    We are stuck in the stone age. We still dial/work with desk phones and 3"x5" index cards.

    I'm trying to figure out the simplist way to insert call data into a database or even into Excel that comes from a url string.

    When certain actions take place my Yealink IP phones launch a url that dynamically appends the url with a parameter such as call direction, phone number,data and time etc.

    Kind of like this

    Http.//192.168.1.12/phone_number={$}

    I'm trying decide if I can even do this with just a database and skip the front end all together or do I need to go ahead and jump into a full blown web app framework.

    I can't figure out how to even record the information. I really want to have to commit to learning a php or rails or angular yet, I just want to learn how to put it in and take it out. Everything I've read just glosses over http request like I should already know how to implement them.

    Can I do this with out having to plan out the full stack of my project at this point?

    I'm sorry for rambling. You know how sales people are ha

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

    Visual basic

    Posted: 27 Aug 2019 12:17 PM PDT

    I am taking a visual basic class, and I've also tried to find tutorials on it, but I just can't seem to find anything

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

    "EJBs are not contextual by nature"

    Posted: 27 Aug 2019 11:46 AM PDT

    I saw this written here and I just can't understand it. I feel like clearing this up would make me understand Java EE a lot better.

    I know "context" is somewhat related to CDI. I know that we can inject objects using CDI, that the injected objects can have a scope (RequestScope, SessionScope, etc). I know that these objects can be "injected" when we use JSF, and their dependencies will be injected too. We can also inject objects when responding to web service calls (eg, JAX-RS). Aren't all of these injected objects EJBs? Perhaps EJB instances are reused between web services, and JSF, and other things? It also confuses me that there is a javax.ejb.Singleton and a javax.inject.Singleton.

    Sorry if my question is too vague. It's hard to even express what my question is.

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

    Are there any worthwhile obfuscation alternatives?

    Posted: 27 Aug 2019 07:25 AM PDT

    I've read through a good amount of posts about obfuscation. While views on the subject vary a little, the overall consensus seems to be that it's useless. So, are there any alternatives?

    A little background... I'm a partner in a commercial software company. We develop Windows desktop software to assist with engineering tasks. The code has come a long way; it originally started in Fortran if that gives any one an idea.

    The majority of the software now is written in VB6, though we're slowly moving into the .NET world via C# and WPF. There is A LOT of code, well over two million lines written in multiple modules and classes; some of it is shared.

    As we move forward, we're worried about the concepts of the software being taken and used to develop. While we have agreements, EULA's, purchase order, and proposals to back us up on the legal sense, we'd still like the cover to be pulled up a little; that will at least keep the honest people honest. We know that we can't stop everyone from taking I.P., especially with something like obfuscation... if they want it, and they're willing to devote the time, then there's little we can do. That's where we rely on the legal system.

    For the quick, "Let me run this through ILSPY and see if I can do my own thing at Company XYZ in LISP", that's what we're trying to protect against. Do we have any options for this?

    Thanks in advance.

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

    Stitchdata.com anyone have experiance with it?

    Posted: 27 Aug 2019 09:04 AM PDT

    A coworker is proposing www.stitchdata.com as possible data integration solution. I can not find a ton of information on them which is never a good sign in my book. Anyone have any experience, or insights they can provide regarding www.stitchdata.com?

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

    In creating a basic NodeJS application with per user templating and authentication, would you use a standard CMS project or a custom build?

    Posted: 27 Aug 2019 05:10 AM PDT

    I wish to build an application to display a standard page with a different template values for each client user. The client users are to only be routed to their own page. The client template values are to be filled out by an in-house technician through the admin dashboard.

    Would using KeystoneJS/ Strapi or similar provide decent functionality or should this be a custom application?

    submitted by /u/Dalv-hick
    [link] [comments]

    I have to learn python and I'm not sure which tool is the best to do it, any suggestions?

    Posted: 27 Aug 2019 08:20 AM PDT

    Hey, as the title says I need to learn python and it would be cool to choose the right tool to do it. I currently have 4 options and I'm fine with whatever but truthfully I am leaning towards visual studio. Anyways my options are VS, visual studio code, an online ide AND text editor, or my schools server( I think it's called UNIX or oceleot). Some experience with these tools before answering would be cool, if not just tell me what you used and any recommendations you have for me.

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

    Cshell help

    Posted: 27 Aug 2019 03:54 AM PDT

    How do I loop through folders in cshell, by using the foreach command' ?

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

    What are some features you are missing in your IDE?

    Posted: 27 Aug 2019 01:35 AM PDT

    Will speculative execution take any time at all when it guesses right?

    Posted: 27 Aug 2019 12:41 AM PDT

    I have a container that almost certainly will never need more than 50 elements and will definitely never need more than 5000 elements. I could either allocate a 5000 element fixed size container or I could allocate a 50 element dynamic container and check whether the container is at maximum capacity each time an element is pushed. Which should work better in theory?

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

    No comments:

    Post a Comment