• Ever wanted an RSS feed of all your favorite gaming news sites? Go check out our new Gaming Headlines feed! Read more about it here.
  • We have made minor adjustments to how the search bar works on ResetEra. You can read about the changes here.

Deleted member 31140

User requested account closure
Banned
Nov 5, 2017
2,089
I'm currently enrolled in an intermediate java class in college. What type of resources would you guys recommend me to use? Didn't start the semester too well so I'm actively looking for ways to enchance my learning. Edit: aside from the links on the op. I'm trying to prepare for a big test that I have next monday. Some concepts that I'm not too clear on right now are: inheritance, polymorphism, input files, arrays and arraylists.
 
Last edited:

Post Reply

Member
Aug 1, 2018
4,511
I'm currently enrolled in an intermediate java class in college. What type of resources would you guys recommend me to use? Didn't start the semester too well so I'm actively looking for ways to enchance my learning. Edit: aside from the links on the op. I'm trying to prepare for a big test that I have next monday. Some concepts that I'm not too clear on right now are: inheritance, polymorphism, input files, arrays and arraylists.

As far as learning goes, there's 2 books "series" that I like going to whenever I'm looking to jump into something new... the "Head First" and the "_____ in Action" books. The books are usually pretty thick, so they won't really help you cram for a test next week, but in the long run, they could be useful to you.

The Head First book is old and I think it focuses on like Java 6 or 7, but for just learning how the language generally works and concepts to use, it gets the job done. It also uses practical, every day language and lots of pictures and diagrams to try to break down complex concepts. It also covers the basics of objects and object oriented programming.

The Java 8 in Action book focuses on using Java 8. I would guess that you're probably using Java 8 in your class, so this one might be the most useful of my recommendations.

The Modern Java In Action book came out within the last couple of years and looks at like Java 8 through 11 (or whatever the newest version of Java is). I think this one focuses more on Java's shift to incorporate more functional programming concepts and shows how to make use of them. This would be a good book if your program has a heavy focus on Java and you end up having to come back and do more complex things in Java.


Head First Java
https://www.amazon.com/gp/product/0596009208

Java 8 in Action
https://www.amazon.com/Java-8-Action-Mario-Fusco/dp/9351197433

Modern Java in Action
https://www.amazon.com/Modern-Java-Action-functional-programming/dp/1617293563
 

Deleted member 2652

user requested account closure
Banned
Oct 25, 2017
3,434
I just listened to the Command Line Heroes episode about COBOL. I has no idea that this is still a thing and apparently really lucrative since the knowledge is dying out.
 

Mi goreng

Member
Oct 28, 2017
1,244
Melbourne
I'm starting out learning how to code and have learnt a bit so far. Could someone give me a rough idea of what a job is like in reality as a programmer/web developer or the like? thanks!
 
Last edited:

Deleted member 55966

User requested account closure
Banned
Apr 15, 2019
1,231
60% meetings, emails, and discussions
20% performing code reviews
15% debugging your own code
04% writing code
01% writing new code

That's life in big companies. Don't know what it's like in smaller companies.
 

ara

Member
Oct 26, 2017
13,017
I'm working as a software dev in a fairly big (I want to say 500+ people) software/consulting firm and have been lucky enough to get projects where the majority of my time is spent actually working with code - writing it, debugging it, thinking about it. Meetings, emails and discussions generally take maybe 10% of my day, although this obviously varies depending on the type and state of the project, etc.
 

Kansoku

Member
Oct 25, 2017
2,213
So, I've been trying to find a remote job like my current one (backend with Java/Kotlin) but there's barely any remote job like that. What I do see a lot is Android jobs, so I'm thinking of learning it on the side, see if I like it enough to go for those jobs. Does anyone knows any good resource for learning Android development that's far from "make your first app!" and closer to real world problems/solutions? I've tried it before once, like 5~6 years ago, so I'm familiar with the basics if things didn't change much (like Activities and Fragments, Intents, the app lifecycle, the XML layout stuff), but the nitty gritty of professional development I'm not familiar with, and I expect that it is quite different from the "hobbyist" approach (like how college didn't prepare me for professional development)
 

Megasoum

Member
Oct 25, 2017
22,568
Hey guys, quick question... I'm working on a .Net Core console app and I'd like to include a feature that would output a file manifest... Basically a tree view of a folder recursively.

Right now I am doing it by capturing the standard out of the powershell command "tree" which works fine but I would love to also have some informations shown for each of the files like size, date created, etc.

Anybody knows a better way to do this? I can build it manually using DirectoryInfo and other stuff like that but then it becomes a pain to create the tree view which is something I'd really like to get.
 

mugurumakensei

Elizabeth, I’m coming to join you!
Member
Oct 25, 2017
11,328
Hey guys, quick question... I'm working on a .Net Core console app and I'd like to include a feature that would output a file manifest... Basically a tree view of a folder recursively.

Right now I am doing it by capturing the standard out of the powershell command "tree" which works fine but I would love to also have some informations shown for each of the files like size, date created, etc.

Anybody knows a better way to do this? I can build it manually using DirectoryInfo and other stuff like that but then it becomes a pain to create the tree view which is something I'd really like to get.

if it's supported in 'tree', you might be able to find something in the documentation. Otherwise, to build it manually, you can build a small in memory tree with each node having the attributes you care about then do a breadth first traversal of the tree
 

Deleted member 31140

User requested account closure
Banned
Nov 5, 2017
2,089
I have a question about a particular java problem. The correct answer is supposed to be "skellington 10", but I'm not really understanding how the string value "bones", stored in the Skeleton object bone, is being replaced by the string value of "skellington", which is stored in the skeleton object Skellington.
Edit: Ohh, I forgot about how reference types are linked to objects. Thanks!
 
Last edited:

Post Reply

Member
Aug 1, 2018
4,511
I have a question about a particular java problem. The correct answer is supposed to be "skellington 10", but I'm not really understanding how the string value "bones", stored in the Skeleton object bone, is being replaced by the string value of "skellington", which is stored in the skeleton object Skellington.

Looks like that problem is testing your knowledge of how parameters are passed to methods. Value-types are passed by value, meaning a copy of the value is made and passed into the method and Reference-types are passed by reference, meaning a reference (basically a memory address) is passed into the method.

If you make changes to a value-type value within a method, the original value is unaffected. If you make changes to a reference-type value inside a method, you're making changes to the original value.

The reason "bones" is changed to "skellington" is because when the "setName" method is called from "skellington", the original value is changed because "bones", "king" and "skellington" all refer to the same object. So if any one of those objects makes a change to the object's state, it's reflected in them all

Stuff like that (mutable state) leads to a LOT of problems in large software if you're not careful. It's one of the reasons why some embrace functional programming.
 

Megasoum

Member
Oct 25, 2017
22,568
if it's supported in 'tree', you might be able to find something in the documentation. Otherwise, to build it manually, you can build a small in memory tree with each node having the attributes you care about then do a breadth first traversal of the tree
Thanks!

After thinking more about it, I think I might just go for a CSV instead with the different data I want (path, size, date modified, etc)... I lose the fancy tree view but I guess I can't have everything haha.

At the end of the day, it's a super small feature in a much bigger project so I don't want to spend too much time on it.
 

Cyborg009

Member
Oct 28, 2017
1,241
I got my first programming interview on Friday. They didn't mention if it would be a technical one or not but I'm hoping it's not.
 

Zelenogorsk

Banned
Mar 1, 2018
1,567
Just got back from my assembly midterm where I had to code bubblesort in MIPS32 by hand, I just want to go back to C++ so bad lol. I'll never take variable names for granted ever again!
 

MotiD

Member
Oct 26, 2017
1,560
I need to write a method to convert a decimal number to a binary number in C
It needs to work for numbers in the unsigned int range. What's a good way to approach this? I know of some methods to convert bases but I'm not sure what would translate well to potentially huge numbers
 

Deleted member 55966

User requested account closure
Banned
Apr 15, 2019
1,231
I need to write a method to convert a decimal number to a binary number in C
It needs to work for numbers in the unsigned int range. What's a good way to approach this? I know of some methods to convert bases but I'm not sure what would translate well to potentially huge numbers
Depends on the context of the method. Always do the least amount of work necessary to achieve the desired result. If the assignment just wants you to print the result to the screen then don't make the function return a bunch of data; make it print the result to the screen.
 

MotiD

Member
Oct 26, 2017
1,560
Depends on the context of the method. Always do the least amount of work necessary to achieve the desired result. If the assignment just wants you to print the result to the screen then don't make the function return a bunch of data; make it print the result to the screen.
The method asks the user to type a number in decimal, which I need to use a char array for (and assume all characters are ascii representation of 0-9) which I'll use strtoul to convert to an int, and then I need to convert that number to binary and only print it

The number could in the range of an unsigned int, so 0 to 65,535 or 0 to 4,294,967,295 according to google
I'm just wondering if this method for example of dividing by 2 repeatedly and taking the remainder would work with a potentially 10 figure number

 

Deleted member 55966

User requested account closure
Banned
Apr 15, 2019
1,231
The method asks the user to type a number in decimal, which I need to use a char array for (and assume all characters are ascii representation of 0-9) which I'll use strtoul to convert to an int, and then I need to convert that number to binary and only print it

The number could in the range of an unsigned int, so 0 to 65,535 or 0 to 4,294,967,295 according to google
I'm just wondering if this method for example of dividing by 2 repeatedly and taking the remainder would work with a potentially 10 figure number


I know you're not asking for anyone here to do your work, but to keep from doing that I'll just quote myself.
Depends on the context of the method. Always do the least amount of work necessary to achieve the desired result. If the assignment just wants you to print the result to the screen then don't make the function return a bunch of data; make it print the result to the screen.
Factor that thinking into your algorithm.
 

Zevenberge

Member
Oct 27, 2017
570
The method asks the user to type a number in decimal, which I need to use a char array for (and assume all characters are ascii representation of 0-9) which I'll use strtoul to convert to an int, and then I need to convert that number to binary and only print it

The number could in the range of an unsigned int, so 0 to 65,535 or 0 to 4,294,967,295 according to google
I'm just wondering if this method for example of dividing by 2 repeatedly and taking the remainder would work with a potentially 10 figure number


The maximum number your algorithm can handle, is dependent on the storage class. If it uses with a 32-bit unsigned long, then your algorithm works just as well for 100 as for 4,294,967,290. Of course, it is always a good test case to try and break your program by putting a number *just* above the limit of the storage class. (Generally, people use something referred to as a "BigInt" for integer numbers that cannot be stored in the built-in storage classes.)

Dividing by 2 is a good approach. You can also look into bit manipulation, aka treat your number as a sequence of bits. (It reads a bit like a trick question though, as an integer is already a binary representation of a number.)
 

MotiD

Member
Oct 26, 2017
1,560
I know you're not asking for anyone here to do your work, but to keep from doing that I'll just quote myself.

Factor that thinking into your algorithm.
The maximum number your algorithm can handle, is dependent on the storage class. If it uses with a 32-bit unsigned long, then your algorithm works just as well for 100 as for 4,294,967,290. Of course, it is always a good test case to try and break your program by putting a number *just* above the limit of the storage class. (Generally, people use something referred to as a "BigInt" for integer numbers that cannot be stored in the built-in storage classes.)

Dividing by 2 is a good approach. You can also look into bit manipulation, aka treat your number as a sequence of bits. (It reads a bit like a trick question though, as an integer is already a binary representation of a number.)
I ended up using the dividing by 2 method and it seems to work fine
Sent the char array to the function, convert it to a number using strtoul then find out if the remainder is 0 or 1 using modulo and divide by two as long as the number is greater than zero

The only 'issue' was I'm not using memory allocation yet so I had to store each remainder in a character array of 32 bytes and print the array backwards

Thanks!
 

Ninja_Hawk

Member
Oct 27, 2017
915
For you guys that do freelance work, what do you typically charge and how do you go about deciding what to charge for your work? I have my first app project coming up soon, where i'll basically be developing the whole thing. Trying to get a good idea before we talk of what is a good offer.
 

GS_Dan

Member
Oct 30, 2017
1,976
Anyone have experience searching for products (specifically movies) by barcode? The barcode APIs I've come across have so far been either totally useless for movie listings or ridiculously expensive.
I've currently resorted to searching eBay for the barcode, and then searching the OMDB API using string matching from the top ebay results. It feels hacky as anything, and would welcome suggestions for alternatives before I start to program this disgusting workflow.
 

Post Reply

Member
Aug 1, 2018
4,511
Anyone have experience searching for products (specifically movies) by barcode? The barcode APIs I've come across have so far been either totally useless for movie listings or ridiculously expensive.
I've currently resorted to searching eBay for the barcode, and then searching the OMDB API using string matching from the top ebay results. It feels hacky as anything, and would welcome suggestions for alternatives before I start to program this disgusting workflow.

I actually recently just had to do this and yeah, my experience was pretty similar. I couldn't find a good solution for finding product info by barcode # and ended up using eBay's API as well. Depending on what you're looking for though, you might actually be able to find everything you need through eBay.

When I first started working on that project, I started using eBay's Finding API, but found out pretty quickly that it wasn't giving me the information I wanted. Then I found the Catalog API and that seemed much more like what I needed, but you have to work through eBay's terrible OAuth documentation in order to successfully make calls to it.

eBay Catalog API

This is the OAuth workflow you have to use in order to use the Catalog API:

eBay OAuth Documentation


Amazon also has a metric buttload of data that seems like you can access through an API, but their documentation is absolute trash and I couldn't even figure out where to begin with it, haha. Like I saw lots of references to a specific Product API, but apparently at some point it got rolled into their ProductAdvertising API and I just couldn't figure out how to use it.
 

Post Reply

Member
Aug 1, 2018
4,511
Brilliant, thank you very much. Weird how we've had the same issues and very similar initial solution!
Are you able to share what project it was for?

Yeah, I was just amazed at how few options there were for a problem like this. Like, programmatically finding product info by barcode # seemed like it would be incredibly simple in 2019, haha.

The project I was working on was an internal web API for other projects in the place that I work at to use. I just had to make something that was easy for everyone else to use, so my API just exposes a couple of endpoints where someone can search by keyword to get a list of products or search by UPC/EAN/ISBN to get details about a specific product
 

GS_Dan

Member
Oct 30, 2017
1,976
Yeah, I was just amazed at how few options there were for a problem like this. Like, programmatically finding product info by barcode # seemed like it would be incredibly simple in 2019, haha.

The project I was working on was an internal web API for other projects in the place that I work at to use. I just had to make something that was easy for everyone else to use, so my API just exposes a couple of endpoints where someone can search by keyword to get a list of products or search by UPC/EAN/ISBN to get details about a specific product
Makes sense, thanks for sharing. Mine's just an excuse to have a pet project and learn serverless, so I wasn't going to fork out loads of money to access a barcode API.
 

GS_Dan

Member
Oct 30, 2017
1,976
Nice! How's that going? What technology are you using? I've been thinking about doing something to mess with Azure Functions
Same - that's literally the reason I'm doing this, as well as do something properly with TDD. :)
Have yet to start, wanted to find a data source before starting in earnest
 

Megasoum

Member
Oct 25, 2017
22,568
Hey guys I have a question... I work with a lot of testers who frequently need to extract call stacks out of a dmp file... They are currently using Visual Studio to do it (this is the callstack format that the devs want to see and they don't like WinDBG)... The problem is that it's starting to get expensive to get every tester a VS license to basically just extract call stacks and nothing else...

I tried looking around but couldn'T find anything... I feel like Microsoft should have some kind of server based software that we could run on a dedicated machine that would simply monitor a folder for any new dmp files and extract the callstack out of it or something like that?

You guys anything of the sort?
 

Deleted member 55966

User requested account closure
Banned
Apr 15, 2019
1,231
Why can't you just have a dedicated machine with one instance of Visual Studio on it to extract the dump files? It's a little walking exercise for the testers, but if the devs are getting priority in debug format that's a quick and cheap way to do it.

Note I'm assuming these testers are working in some sort of lab environment and you have a network filesystem setup.
 

Megasoum

Member
Oct 25, 2017
22,568
Why can't you just have a dedicated machine with one instance of Visual Studio on it to extract the dump files? It's a little walking exercise for the testers, but if the devs are getting priority in debug format that's a quick and cheap way to do it.

Note I'm assuming these testers are working in some sort of lab environment and you have a network filesystem setup.
Yeah we definitely thought about that but we're not sure if that would be ok license wise
 

metaprogram

Member
Oct 28, 2017
1,174
Hey guys I have a question... I work with a lot of testers who frequently need to extract call stacks out of a dmp file... They are currently using Visual Studio to do it (this is the callstack format that the devs want to see and they don't like WinDBG)... The problem is that it's starting to get expensive to get every tester a VS license to basically just extract call stacks and nothing else...

I tried looking around but couldn'T find anything... I feel like Microsoft should have some kind of server based software that we could run on a dedicated machine that would simply monitor a folder for any new dmp files and extract the callstack out of it or something like that?

You guys anything of the sort?
LLDB is open source and can do this, even runs on Linux. Just make a python script / batch file that does it. "lldb -c foo.dmp" and then "bt"
 

metaprogram

Member
Oct 28, 2017
1,174
Also the minidump format is documented plus there's a Windows api to extract information from dump files, you can always write this tool yourself if need be
 

opticalmace

Member
Oct 27, 2017
4,030
Hey y'all, I'm looking for books on Java and DevOps if anyone has some suggestions. I've done one semester of Java, so I'm looking at the beginner/intermediate level (tho I have many years of Python so it's helping).

DevOps is somewhat new to me (starting new job in mid-december), so any resources help. Thanks!
 

ara

Member
Oct 26, 2017
13,017
Speaking of books, anyone got any good ones for Spring and Springboot? Something that goes through everything they've got to offer with examples, use cases, code snippets, in-depth explanations, whatever.
 

BreakyBoy

Member
Oct 27, 2017
1,027
Hey y'all, I'm looking for books on Java and DevOps if anyone has some suggestions. I've done one semester of Java, so I'm looking at the beginner/intermediate level (tho I have many years of Python so it's helping).

DevOps is somewhat new to me (starting new job in mid-december), so any resources help. Thanks!

I'm not trying to be pedantic or mean, I want to help, but I need more direction. DevOps is an extremely overloaded term nowadays. Can you be more specific?

If you're not even sure where to start:

DevOps%2BRoadMap%2B2.png

That's honestly just the basics of what I'd expect someone joining our team to be at least familiar with, and I'd hope for real-world experience with as much of that as possible. Honestly, probably all of that depending on the seniority of the position being filled.

Another good site to explore is: http://www.devopsbookmarks.com/

And honestly, depending where you're working, you might be staring down the deep end of cloud architectures, scaling, etc, which puts you square in the containerization/serverless/Docker/Kubernetes world. In which case, you can start poking around: https://landscape.cncf.io/

This is admittedly a lot of shit. Which is why I'll say again, you don't need to be an expert at all of this. Just start exploring, ask questions. For instance, if you don't know how to set up a reverse proxy (or even why you would want to), then start there. You can worry about the rest later.
 

opticalmace

Member
Oct 27, 2017
4,030
I'm not trying to be pedantic or mean, I want to help, but I need more direction. DevOps is an extremely overloaded term nowadays. Can you be more specific?

If you're not even sure where to start:

DevOps%2BRoadMap%2B2.png

That's honestly just the basics of what I'd expect someone joining our team to be at least familiar with, and I'd hope for real-world experience with as much of that as possible. Honestly, probably all of that depending on the seniority of the position being filled.

Another good site to explore is: http://www.devopsbookmarks.com/

And honestly, depending where you're working, you might be staring down the deep end of cloud architectures, scaling, etc, which puts you square in the containerization/serverless/Docker/Kubernetes world. In which case, you can start poking around: https://landscape.cncf.io/

This is admittedly a lot of shit. Which is why I'll say again, you don't need to be an expert at all of this. Just start exploring, ask questions. For instance, if you don't know how to set up a reverse proxy (or even why you would want to), then start there. You can worry about the rest later.
Thanks, this is really helpful. This is a career change for me (been an astronomer up till now), and I only realized in the last few months that part of my duties at my last job (last 2 years) fall under the devops umbrella to some extent (lots of scripting, CI with Travis/Circle, testing and deployment, writing software, some database work). Applied to this job and we had a few rounds of interviews and they seem to be OK with me learning on the job (and I'm going to be learning in my own time anyway to try to do as best I can). It's a junior position, as an aside.

I'm just going to copy and paste from the job ad in case it gives a bit more background. But you've already helped a lot, so thank you!

Technologies in Use:
Big Data Technology (Cassandra, Zookeeper, Hadoop, Kafka)
Deployment Automation (Puppet, Fabric, Ansible)
Continuous Integration Systems (Jenkins, Bamboo)
Build Management Tools (Git, Maven)
Scripting (Python, Ruby, Perl, Bash)

Role Responsibilities:
Monitor the performance and improve reporting on production systems
Database administration and report generation on production systems
Enhance deployment procedures and participate in deployments
Maintain and improve build and continuous integration system
Ensure proper management of development, test and staging environments
General system administration tasks on Linux platforms
Provide 3rd level support
 

mugurumakensei

Elizabeth, I’m coming to join you!
Member
Oct 25, 2017
11,328
Thanks, this is really helpful. This is a career change for me (been an astronomer up till now), and I only realized in the last few months that part of my duties at my last job (last 2 years) fall under the devops umbrella to some extent (lots of scripting, CI with Travis/Circle, testing and deployment, writing software, some database work). Applied to this job and we had a few rounds of interviews and they seem to be OK with me learning on the job (and I'm going to be learning in my own time anyway to try to do as best I can). It's a junior position, as an aside.

I'm just going to copy and paste from the job ad in case it gives a bit more background. But you've already helped a lot, so thank you!

looking at that job description, it's likely they need you to work on package management and auto deployment systems with a likely caveat that said tooling can generate packages for any of the languages they support.
 

BreakyBoy

Member
Oct 27, 2017
1,027
Thanks, this is really helpful. This is a career change for me (been an astronomer up till now), and I only realized in the last few months that part of my duties at my last job (last 2 years) fall under the devops umbrella to some extent (lots of scripting, CI with Travis/Circle, testing and deployment, writing software, some database work). Applied to this job and we had a few rounds of interviews and they seem to be OK with me learning on the job (and I'm going to be learning in my own time anyway to try to do as best I can). It's a junior position, as an aside.

I'm just going to copy and paste from the job ad in case it gives a bit more background. But you've already helped a lot, so thank you!

looking at that job description, it's likely they need you to work on package management and auto deployment systems with a likely caveat that said tooling can generate packages for any of the languages they support.

Yeah, I'd agree with that. And if you're coming in on a more junior role, that implies you'll have a team, or some support structure around you. I've had a "DevOps" title for about 8 years now, across three companies and a bunch of side work. Build/release automation is a common part of it, and it sounds like your prior experience already has you on the right path for handling that. Depending on the size/structure of the company, I wouldn't be surprised if over time you end up also helping with more SRE/DBA type work since they're mentioning experience with Cassandra & Kafka.

This is generic advice, but always worth it as a reminder: just know that every company does things at least slightly differently, so expect to have to spend some time just figuring out what their current process is like, and what their requirements are, before you can do any effective work on supporting, enhancing, or even building something from scratch.

Again, if you want advice/direction on a specific topic, feel free to ask.