Anand Athinarayanan

Ranch Hand
+ Follow
since May 20, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anand Athinarayanan

I'm learning Spring Boot and ReactJS and thought of building a simple web application to practice. The idea is to allow users to add Coupon Information and then get alerted (not decided how, but Email is a thought) when the coupon nears it's "To be Used by Date". This is just a hobby app for me to learn both the technologies. Most of the websites I have checked have the React App served from a NodeJS server and then for the backend it interacts with Spring Boot mostly through an API. The one tutorial I had with just Spring Boot and React (using Thymeleaf) here seems overly complicated as it references something called web-pack which I have no idea about.

So my question is how common is to have a NodeJS with React and a Spring Boot and is this even a good architecture for web applications? If not then is the architecture in the tutorial (link above) more common?
I have only worked with one front end and one back end server/service so far in my career.
Yes I think ZG was right. In my mind I think of this like a utility type of method which can stand alone and can operate on the given input. I also think this is like some of the Apache IO Utils library most of which are static.
Would love to hear your opinion.
2 weeks ago

Zachary Griggs wrote:Lots of good solutions here!

Personally I made the method static because if I had to use this in my project, I would create some sort of StringHelper or StringUtility class that does not get instantiated. The method itself doesn't need any sort of state to operate correctly. Though this is very much open for debate; I don't think there's a "correct" answer here so I'd be interested in hearing other perspectives.

I believe you could also do a toSet() call, rather than the .distinct().toList(). Though that works completely fine as well.

I found this thread from the code ranch October journal and I came here to respond the exact same thing. I saw some one ask the OP an opinion on why Zachary Griggs made the method static.
2 weeks ago
This is great Ken. Definitely much more robust and testable. I will give it a spin and get in touch if anything is not working. I'm beginning to like Python already
2 weeks ago
I appreciate the offer Ken. So here is what I have so far. Won't be able to post the actual code but it's close to it. I'm using python 3.7.1

Initial tests show it is working fine but just seems very slow. I think it might be because the orderDetailsData file is on a network storage and I need to access it each time which Unfortunately I cannot copy to my machine because of "restrictions" . But what do you think and is there a better or Python way of doing it.

Have to say this, coming from a Java background I find the python libraries very useful but at the same time I couldn't think in Python yet. Keep going back to OO and SOLID principles.
2 weeks ago
Thanks Ken. I might have misquoted my problem. It is not a specific pattern. It's a list of unique text running into one thousand atleast . The text is a combination of alphabet and numbers example would be - XY18736272. This is the source file.
And then I have few hundred files, each file running into thousand or more lines. In some of these lines the text XY18736272 would be embedded. If I find it I need to extract the full line containing it and write to another file.
One advantage is the hundred odd files are comma separated files so I know exactly which position to look for.
At this time I have been able to just start with file reading part.
I will look at your examples also. I see there is a free preview of your book in the site. Thanks
3 weeks ago
Thank you for your responses. I have always wanted to learn a different language other than Java but never just got around to do it. Python seems different but interesting. At my work recently I had to read a bunch of files and look for specific patterns from a different file and extract the entire line matching the pattern . I'm thinking of trying it out in Python. I was able to get my request for the software approved. This is not part of my project work but just a side work that we normally use excel for. Let's see how this goes.
I'm a bit on the slower side of learning but persistent learner.
3 weeks ago
I'm a Java/Gosu developer mostly working in enterprise wide web application. Recently I have seen more traction in the world of python and a lot of it revolves around machine learning. I have no background in Data science . I don't even have a CS degree from college for the matter. So I'm wondering is python a good language to learn for improving job prospects and career for someone with a Java web background and not wanting to move to data science world now.

3 weeks ago
Tim : Thank you. By API I mean a library. Regex always has been confusing for me but I understand for text manipulations Regex is powerful. I like it when there is less code.

Campbell : Whoa, that's some good advice. Thank you. I'm checking the link you provided. I have to go back to my notebook now.
3 years ago
I'm working on a problem of stripping NON ASCII data from an input string ,replace it with whitespace  and return the ASCII data. There are probably libraries which do it already but i'm getting back to honing my java skills so i wrote code for that. And then it got me thinking, if i were to expose this as an API what else should i do ? Put it another way do we have a blue print for writing code that makes it API ready.

What are some improvements that i should make when writing code for such problems which are common and what type of tests are run usually ?

3 years ago
It feels great to read through all the replies in this post.

@ Michael D Sims - Using Regex came to my mind after I came out of the interview room.

Update - I didn't get the job but I did learn quite a lot from this thread and I'm happy to realize i have a lot to learn and a long way to go. Thank you everyone for your thoughts !
5 years ago
@Junilu Lacar - Exactly !

@Joe Harry - Thanks. Never Struck me at that moment but again it would have been no use anyway. No body is going to do that in any kind of job.

@ Maneesh -Wish , I could have answered like that
5 years ago

I was asked in an interview to write a program which prints the number of Vowels in a String. I started writing the code and used the charAt method of String when the interviewer asked me not to use any of the String API's.
And the String is just a word like "Hello" without any separators.

I couldn't answer the question. So I thought if any of you have an idea on how to do this.

Thanks !
5 years ago
I don't find anything wrong with the browser interface, i was looking for ideas for developing a desktop application and thought of something that would be useful to developers. No problem with the java ranch search.

Thanks for that wonderful insight. Java Ranch has helped me countless times and I would never ever do anything to cause any damage even inadvertently. I'm going to change my requirement a little.
Instead of displaying the results in my application, I'm going to open the user's browser and post the query in Java Ranch's search box and all other interactions will happen through the browser only.
I'm sure its allowed because instead of the user directly launching the browser my application does it for him. If you can think of any problems this may cause to JR, do let me know. I'm not going to have the posting questions/answers feature yet. Even if I do, its going to be the same as the search. Launch the browser with the url and let user do the rest.

Thanks for the tip about StackOverflow. Honestly, I'm just going to restrict myself to searching questions/answers.

8 years ago
Hi There,

I would like to know if there are any API's available for Coderanch or java ranch something that stackoverflow provides to get the questions and the answers.I couldn't find anything in google.
I'm just thinking of developing an application which would enable the users to search java ranch for previously posted questions or may be even post a question or an answer through my application instead of accessing it with the browser. My application would be a desktop app which (if connected to the internet) will allow the user what i just said before.

Does Java ranch provide any API calls for these or do you guys have any other suggestion for me ?

8 years ago