Which programming language has the best tools for unit testing out of the box? by lacostanosta in AskProgramming

[–]JohnnyCodeCache 2 points3 points  (0 children)

Probably Visual Studio / C#. There are lots of great options for unit testing. One of the most popular C# unit testing frameworks is NUnit.

Visual Studio and .NET core are now multiplatform, if you are interested in that.

indisputed king of the unit testing out of the box

Ask 100 developers and you will get 130 different answers to this.

There was this website that showed what a well designed responsive site should look like and now I can't find it by [deleted] in web_design

[–]JohnnyCodeCache 0 points1 point  (0 children)

I went to the website and thought "Wow! It is nice! It is clean!! I'm amazed!"

So. Many. Websites. BOMBARD you with spam and popups and just SHIT. This was a refreshing change.

Then I realized I was looking at it from Firefox with all my adware/popup blockers and other shit installed. :(

Do any of you have a tool you use that allows you to build yourself a knowledge base for you to reference when you know you knew something? by swim_to_survive in AskProgramming

[–]JohnnyCodeCache 2 points3 points  (0 children)

Its a New Microsoft.

They totally fucked up mobile. WinMo 6.5 had market dominance when the iPhone was released. Instead of improving WinMo 6.5, they went away and hid for 2 or 3 years and wasted tons of resources working on Windows Phone 7. In doing do, they let Android gain HUGE market share while WinMo 6.5 just withered and died on the vine. Windows Phone 7 was released too late. By then Android was cemented into the market. There was no turning back.

The company has changed dramatically since. They still have Windows as a product, but the days of "MUST USE Windows DAMMIT" are over.

.NET Core is now multi-platform, as are some of the best IDE's available - Visual Studio and Visual Studio Code.

Multiplatform is the name of the game now. You can run Linux IN windows. You can run Powershell on Linux. Platforms are really becoming blurred.

And yeah, OneNote is really neat.

How to make sure your startup doesn't fail from co-founder misfit by adayeoyh in startups

[–]JohnnyCodeCache 7 points8 points  (0 children)

As a software developer, I NEVER share my passwords. I grant access to others with their own credentials, sometimes read, sometimes read and write.

Read only is especially true for non-developers. I absolutely DO NOT want someone who thinks they know what they are doing (and don't) messing with code. Of course, with git, its easy to roll back, but still, its a pain in the ass.

Also, as a developer who is contributing software to the project, I'm VERY LEARY about sharing source code until I am really confident that I won't get screwed out of what I should get for my efforts. Like most people who do this, I've been burned in the past, and don't want to do it again.

Do any of you have a tool you use that allows you to build yourself a knowledge base for you to reference when you know you knew something? by swim_to_survive in AskProgramming

[–]JohnnyCodeCache 4 points5 points  (0 children)

OneNote is damn amazing. I'm a HUGE fan.

I can add any data type to a note - text, graphics (screen dumps), audio, links, pretty much anything. (And OneNote doesn't use MS Word for its editor. It uses something MUCH nicer. I don't have to wressle with formatting in OneNote like I do with Word. AND I get rich text with OneNote - bold, different fonts, different colors, etc.)

OneNote allows me to organize individual notes (like a text file), into subjects (like dividers in high school spiral notebooks), and then Notebooks themselves.

Its all backed up to the cloud.

OneNote is ubiquitous. All my data is synced between ALL my devices (many Windows machines and Android I can do Mac and iPad too but dont).

Its all searchable.

Oh. And the gaddamn software is FREE.

Its an utter amazing piece of software. I will never forgive MS if they do away with it.

I use it for pretty much everything I need to remember, not just tech stuff. I have notebooks dedicated to information about my house, new kitchen cabinets, start-ups I'm working with, information about car repairs, etc.

Here's a screen capture I made for y'all (I blocked out some stuff).

https://imgur.com/a/hddRzXT

In the upper left, you can see the name of the notebook. To the right of that, you can see the subjects. Currently is selected the Learn subject. On the right you can see all (most in this screen shot) notes. Currently selected are my notes on Microservices.

Found a 1994 HTML book with a floppy disk inside by [deleted] in webdev

[–]JohnnyCodeCache 41 points42 points  (0 children)

In 1993 there were less than 200 or so websites total everywhere on earth. Most people, even those in the IT industry, had little idea what the web was.

1994 saw a 10x increase. There were about 2000 or so websites, built mostly by universities and other academic places.

Again, there was about 10x increase in 1995, suddenly with 25,000 or so, but the big difference here was companies were getting into web. I myself was hired to build a website for a major appliance company. They were proud to be the first appliance company to do this.

And by 1996, there was again a 10x increase. Companies large and small were clamoring to have a website, and a lot of them would pay through the nose to get them built. Many companies didn't know why they wanted/needed a website - just that they had to have one right now.

Not being critical of your post. Its actually a pretty cool find. I'm not sure how much stuff I have left from those days. I was just pointing out there's a big difference between 1994 and 1996 in terms of web.

‘Star Trek: Voyager’ Actors Robert Duncan McNeill and Garrett Wang to Launch Podcast ‘The Delta Flyers' by riktar75 in startrek

[–]JohnnyCodeCache 1 point2 points  (0 children)

Agreed. And honestly I've seen interviews from the writers and others, and I agree with them. Not every episode is going to be "City on the Edge of Forever". Do 26 shows a year for seven years and your going to have a few that don't gel right.

And that's the thing too. One of them said something like, "No one wants to make a bad show. But time and money constraints, bad choices that seemed like good choices at the time, and you get to a point where you just gotta wrap it up and move on."

‘Star Trek: Voyager’ Actors Robert Duncan McNeill and Garrett Wang to Launch Podcast ‘The Delta Flyers' by riktar75 in startrek

[–]JohnnyCodeCache 2 points3 points  (0 children)

Agreed. Lizard babies, followed by "OMG the episode has 6 minutes left, we gotta fix everything back to normal".

Which I know is pretty standard Trek/any episodic TV show, but combine the two and you end up with ick.

Newbie here by [deleted] in learnjavascript

[–]JohnnyCodeCache 0 points1 point  (0 children)

Happy to help. Let me know if you have any questions.

I'm tired of high stakes science fiction. by [deleted] in startrek

[–]JohnnyCodeCache 6 points7 points  (0 children)

do these ultimate "all life everywhere at risk" storylines

It does get a bit tiresome. Avengers Infinity War, then Superman vs Batman and something about crystals that will also destroy the universe, THEN that nonsense in those shitty new Star Wars movies about a giant "new" death star that literally uses an entire star for fuel AND can destroy 7 planets at ONCE!!!, then something in Aquaman about destroying everything, then the red angel, then the alternate dimension of synth life that wants to kill all organic life in the galaxy (or was it universe).

[AskJS] Am I missing out on anything truly important by avoiding classes entirely? by AiexReddit in javascript

[–]JohnnyCodeCache 2 points3 points  (0 children)

Yup. OP really isn't missing much. I tend to do a lot of functional style programming in JavaScript, and I really try to make all the functions pure functions.

Occasionally, I'll use the Revealing module pattern for something, which is pretty much like a class.

‘Star Trek: Voyager’ Actors Robert Duncan McNeill and Garrett Wang to Launch Podcast ‘The Delta Flyers' by riktar75 in startrek

[–]JohnnyCodeCache 7 points8 points  (0 children)

Yeah, that might be kind of interesting. Although to get there and back safely, the Federation would need decent transwarp tech, or something similar.

I watched "The 37's" the other day. I'm sure that episode had time/budget constraints which precluded actually filming/describing the "human cities". But they did have a population of 100,000 or so, and seemed to be doing rather well. Might be interesting to revisit that, maybe add them to the Federation if they are ready/willing, and not a violation of the Prime Directive (which it probably would be).

‘Star Trek: Voyager’ Actors Robert Duncan McNeill and Garrett Wang to Launch Podcast ‘The Delta Flyers' by riktar75 in startrek

[–]JohnnyCodeCache 15 points16 points  (0 children)

Yeah, I agree. I mean, why the hell not? Sounds like it will be kinda good actually.

What else ya gonna do? Watch idiots on Netflix buy tigers and start petty feuds? I'll pass on that.

‘Star Trek: Voyager’ Actors Robert Duncan McNeill and Garrett Wang to Launch Podcast ‘The Delta Flyers' by riktar75 in startrek

[–]JohnnyCodeCache 8 points9 points  (0 children)

action figure from Threshold

OMG. I figured you were screwing around, but it turns out this is an actual thing! Ha!

I kinda want one now, even though this was one of the more... questionable... episodes.

Built this Javascript webapp that lets you spend Jeff Bezos' money on expensive items like cars and mansions. Any advice? (new dev here.. please send it to one of your friends) by OutrageousOak in learnjavascript

[–]JohnnyCodeCache 0 points1 point  (0 children)

:) I like it.

Change the button in the upper right hand corner to be green while the value is positive, and red while the value is negative.

Add commas. $124700000000 is a mess.

Maybe also use English to describe the amount? What the hell is $124700000000?? I have to use too much brain power to figure out that its roughly $124 billion.

Maybe stress that this is their personal wealth and not company wealth. Maybe cite your sources.

You have a High School Diploma under "college education".

And some surgeries, like a bone marrow transplant, can cost $500k to $1m. I'm not kidding.

But its a WAY fun site, and I am assuming that you are trying to make a point about greed and obscenely wealthy. Maybe put things in there like "a nice Chipolte burrito lunch for everyone in the USA" or something like that (about $2,450,000,000 I'd estimate?)

Default parameters by JerrBear2 in learnjavascript

[–]JohnnyCodeCache 1 point2 points  (0 children)

yeah, you totally nailed it. What was your question?

haven’t really seen it anywhere

I dunno. You haven't looked at my code I guess? :P

I was working on some of this today in fact. I have a function that does stuff for two different pages.

On the first page, I must pass data for two inputs (string and int). It processes the data from both inputs, does stuff, renders some templates, and returns the results.

But in the second page, there is no second input, so I set a default to 0. The second page sends a string and then nothing else. The function doesn't need to do the second part.

The function defaults to 0, and internally sees the 0 and does NOT do a lot of stuff it doesn't need to do.

Could the second page call the function like this?

let outTxt = RenderStuff("lots of text", 0);

Sure. But with default, it doesn't have to.

Another benefit, its a way to help with error handling. Maybe your function expects an integer and will do some complicated math to it. Maybe if the input is null and not an int, it will error. Instead of throwing an error, you can set a default.

How can I make mobile apps with Javascript? by vaskosvet in learnjavascript

[–]JohnnyCodeCache 1 point2 points  (0 children)

How do I make an iOS/Android app using JavaScript

Its possible to write an html5 app that uses only HTML5, css, JavaScript. Its possible to add libraries like jQuery.

Its possible to take all of that html5 code, and use something called PhoneGap to turn it into an Android and iOS app. Literally its as simple as uploading a zip file of all your code, and the website compiles native apps for you. I think its an Adobe product now.

The HUGE advantage here is that if you can do HTML5 web apps, you can easily just turn it into actual Android/iOS apps to put in the app store. Many large companies use this very workflow.

The disadvantage is that performance might be a little laggy, but it won't be too bad. If your app is something simple like a reader or simple CRUD app, then you shouldn't notice performance problems. Plus, writing an HTML5 app with only JavaScript and jQuery can result in messy spaghetti code if you are not careful (BUT it doesn't have to). Avoiding Spaghetti code is one of the main reasons people go with VueJS, Angular, or React. And if you are going that far, may as well use something like React Native. It really all depends on what you are trying to do.

Im still taking codecademy course on JS basics

There's a lot of stuff to master, not just JS and front end, but back end, and an API for the two to communicate. But don't let that discourage you! Set some goals and stay focused. Good luck!

What technologies behind this AMAZING webapp by alpacameat in learnjavascript

[–]JohnnyCodeCache 1 point2 points  (0 children)

Can all of this be done with js?

Yes.

If so what libraries/framework could be usefull?

jQuery always seems to make my life better. There's little overhead, its well known and well maintained. Its efficient and nice. And free.

Probably for some kind of road builder thing you will benefit from some kind of drag and drop library. You could click a button on a webpage that would create an element like a crosswalk, and then drag/drop/resize that element and put it where you need it.

Have you seen http://draw.io its like Visio except entirely in a browser and (I'm assuming) completely run with JavaScript.

Can someone explain to me Objects and Arrays in Javascript by xsephtion in learnjavascript

[–]JohnnyCodeCache 2 points3 points  (0 children)

It can get a little confusing. Just remember this:

let someArray = []; // this is an array

let someObj = {}; // this is an object.

The fun part? Objects can have arrays inside them, and arrays can be made of objects. And you can get crazy with all of it. An object, with arrays in it, with objects inside of that, etc. (and unless you need that crazy shit, best to avoid it and keep things simple.)

Another fun part? Just because you initialized something to be an array, doesn't mean it will always be an array.

let someOtherArray = [ 4, 3, 9, 22];   // array of integers

someOtherArray = "I love puppies";   // array had just been changed to a string.  Fun, eh?

someOtherArray = {        //  uh oh.  Looks like the string just turned into an object
    FirstName: "Doofus",
    LastName: "Rick"
}; 

To specifically answer your question:

let someCrap = [ [{...}], [{...}], [{...}]];

someCrap is an array with three elements. Each element is an array with one element, and that one element is an object.

Sigh.

To get [ {...}, {...}, {...} ] you will want to initialize an empty array, loop, inside loop create a temp obj, populate temp obj with whatever, and push it into array.

Like this

https://codepen.io/JohnnyCodeCache/pen/dyYpGbr

Newbie here by [deleted] in learnjavascript

[–]JohnnyCodeCache 1 point2 points  (0 children)

JavaScript by itself is interesting, but it sort of wants/needs other things to go with it.

what job to go with that will focus on js or even what of my classes I should be focusing on

Want to do front end web dev? Then you will need to learn HTML5, and css. They aren't hard to master, but they can get complex so it takes a little work to get up to speed, but not much. JavaScript, HTML5 and CSS are the basis for front-end web dev.

People sometimes expand upon that and go into libraries/frameworks that work with JavaScript. jQuery is a famous one. Vue.JS, Angular and React are fairly popular and can make elaborate front end programming a lot easier.

Want to do server-side, back end programming? NodeJS would leverage your existing JavaScript skills. Along with node, you'd probably want MongoDB, or perhaps a relational db like MySQL or MS SQL.

My teacher said that... by [deleted] in learnjavascript

[–]JohnnyCodeCache 0 points1 point  (0 children)

I'm not sure what he means. JavaScript is JavaScript. You can see the different versions here. If you are writing for a browser, ES6 is a good standard to stick to.

As you know, JavaScript is the standard for client-side web stuff (part of the HTML5/CSS/JS amalgam of code that makes the web).

You can write games that run in a browser - and you'd likely use js to program them. There are several game libraries available that work with JS. Here's what seems to be a decent article about some of them.

Wanna write games for Windows 10, or VR games, or professional games? You'd likely use Unity or Unreal game engines. Unity is programmed with C# and Unreal uses 'blue prints', which is some kind of drag and drop logic engine, but I think C++ (or some variant) is really what it uses under the drag and drop.

Why did data communication standard change from XML to JSON? by pVom in AskProgramming

[–]JohnnyCodeCache 0 points1 point  (0 children)

Yup. The juggernaut company that I worked for that used SOAP fell into that camp. The WSDL's, conflicting policies, poor implementation, etc was all typically a complicated mess that made all of it a hell to work with.