Optimizing a Static Site

Programming - Fri, 03/16/2018 - 18:08
Categories: Programming

Is it better to pay for an online course for beginner programming versus a free course and will a Microsoft Surface Pro 4 an efficient device to start on?

Learn Programming - Fri, 03/16/2018 - 17:42

Udemy has both free and paid courses. The paid courses are on sale for $10+. I intend on learning C, C++, then progress to Java and Javascript and finally Python. I have learned the basics of HTML, CSS and SQL.

I currently am a case manager, I intend on learning programming as a back up or make useful throughout my life given the opportunity and experience I take away from this.

I however lack in math, but I've done civil engineering dealing with math on the daily given the circumstances. I wouldn't want that to defer me from learning!

Also, I am looking to purchasing a new laptop. Precisely to take notes when I enroll back in college next year, so I'd like to take advantage over a laptop that's capable of programming. I am more experienced with Microsoft as opposed to Apple, but I have been on an iPhone for the past several years and wouldn't decline a MacBook.

Any help would best be appreciated, resources as well! Thank you.

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

universities abroad

Learn Programming - Fri, 03/16/2018 - 17:00

Hey, the thing that i want to talk is about the entrepreneuring and university in middle east or in Turkey. There re many difficulties here. how can i make good stuff or is there someone who can compare Turkey with the other lands? i just can compare it with Germany (lived there 6 years).

and are there any universities in Turkey which is qualified and good seen in USA and Europe?

i wanna study it (computer engineering here in Turkey) but i want to study electronics too! my German is fluent and my English is like this post. what do you guys advice me? i thought about to study in Germany too. i want to begin programming i have a bit arduino experince but i cant make good things because of my school subjects. firstly i must go to the uni.

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

Computing the running max

Programming - Fri, 03/16/2018 - 16:53
Categories: Programming

Can anyone help me understand the filter() method in JavaScript?

Learn Programming - Fri, 03/16/2018 - 16:22

Im doing a homework and i wanted to remove all empty element from an array. I looked for a solution online beause i was starting to go pretty deep down the rabbit hole and came across a neat and elegant solution that look like this:

arr = arr.filter(function(n){ return n != undefined });

which did not work right away but i fiddled around and got

arr = arr.filter(function(n){ return n != ""; });

Now, my rule of thumb for homework is that i dont mind looking online for idea but i will only use a solution if i understand it and can explain it and recreate it. I tested this solution and it works like a charm! but i never used array.filter() and we haven't seen it in class. i tried digging a bit online to find out whats up but ive never been exposed to something that looks like it. Something about callback and an argument. Ive also never written a function as a parameter.

I just don't exactly understand whats going on there. Is the function the callback? and what exactly is a callback, how does filter() work and why is return n != ""; doing what it does?

i understand the function returns a new array n where all the "" element have been filtered out.

Is filter() similar to a for loop that checks all the element of an array and returns a new array with all the element that fits the condition given ( in this case != "" )? the syntax is very alien to me. but what could i do with filter()?

i tried playing around with the function because form my understanding arr.filter(arr != ""); or something of the sort should work, why the need to pass function(n) as the argument?

tl;dr: i dont understand how filter() works, how does it work?

while writing this post i think i figured how to achieve what i want with a for loop, so ill probably use that but it would still be nice to learn something new :).

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

Getting started with C

Learn Programming - Fri, 03/16/2018 - 16:16

I've decided I wanted to start learning C, as low level programming language seems really interesting and useful (I only know Python and some C# right now), but I'm kind of falling at the first hurdle a bit in that I can't get anything to run properly. I've set up code::blocks with the MinGW compiler exactly as it says to do online, and whenever I try to build a program that I know should work by copying it from online, the build log just says it failed, and that's it. If I run and build, a box comes up saying that the project hasn't been built yet, and if I say yes the same box just keeps coming up until I press no instead, after which a cmd comes up with 'process returned 4258096 (0x40F930) execution time : -0.000 s'.

I've tried to run this in visual studio as well and that doesn't work either, so what's going on here?

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

Java Spring Async Error Handling HELP

Learn Programming - Fri, 03/16/2018 - 16:07

I'm desperate for some help.

I am attempting to write a Java Spring Web-Service, in an asynchronous fashion. With standard valid parameters, everything is running fine.

What I'm having trouble with is understanding how I can design my methods to handle Exceptions.

An example end point I have:

@Async @RequestMapping(path="/open_account", method=RequestMethod.POST, consumes=MediaType.APPLICATION_JSON_VALUE, produces=MediaType.APPLICATION_JSON_VALUE) CompletableFuture<Long> openAccount(NewAccount newAccount) throws FatalErrorException, AccountOverdrawnException { return CompletableFuture.completedFuture(TRANSFER_SERVICE.openAccount(newAccount)); }

When one of these expected exceptions occurs, my executing thread dies and an UnderclaredExceptionType is thrown.

1 - How should I design a method to be Async, but still be able to return exception information to the client? Or should I use return values to indicate failure EG. -1 for an invalid account opening?

I've tried Callable and CompletableFuture for my async code, but am having the same issue on both.

Anyone have any ideas?

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

Best way to go about building a searchable game information website?

Learn Programming - Fri, 03/16/2018 - 16:02

I feel like this is a lot more difficult than my team and I anticipated.

We are trying to make a website that allows users to search for abilities.

These abilities have pre-requisite abilities, and also min/max stat requirements. For example you need to have a B in STR to use a certain ability, or no greater than a C.

What would be the simplest/most effective framework/database for a team who only really know HTML,CSS, JavaScript and bootstrap be? We've only learned SQL Server but looked into MongoDB NoSQL. We are all very new to programming.

The most complicated thing I've done is the upskill course that is #1 of all time on this subreddit but I can't re-create that without looking at the videos again and none of my team has experience with ruby on rails either. Any help is appreciated.

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

Anyone else having problems with pager of module pages in drupal 7?

Drupal - Open Source Content Platform - Fri, 03/16/2018 - 15:28

For a reason I do not understand my pager has stopped working. Any ideas why this might occure? I once enabled cache for views and pages but i changed it back and cleared all cache and still the pager does not work.

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

My Sloppy Excel VBA Code

Programming - Fri, 03/16/2018 - 15:19
Categories: Programming

What are some really great textbooks to learn Python from?

Learn Programming - Fri, 03/16/2018 - 15:17

So, I made a post earlier asking what the difference between programming languages are. The answers were very lucid and were huge eye-openers for me. In fact, they've helped me decide on studying Python for for now.

That said, I've taken some courses online so far, but I want to saturate my education with many sources. That said, I was looking into textbooks on Amazon, until I found a bunch of different textbooks that all have great ratings, so it's making it a bit hard to pick the one for me.

That said, I was wondering, for those of you who have experience studying Python from a textbook, which textbook(s) you'd recommend.

Just for clarity's sake, I'm a beginner programmer. Never programmed in my life EVER, but I'm HIGHLY willing to put myself through intensive studies.


P.S. Yes, I have looked into coding bootcamps, but they're WAY too expensive for me right now, unfortunately :(

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