[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Scripting

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 102
Thread images: 6

File: java-logo.png (7KB, 259x259px) Image search: [Google]
java-logo.png
7KB, 259x259px
i'm 1/2 way through my first programming class in Java, and holy fuck I feel like everything in computing is finally clicking for me. the IDE is awesome and I can pretty much build any kind of application, with a GUI or without.

So serious question, why would a person ever use a scripting like Python? Are they just too lazy to actually use a real language that is compiled or am I missing something?
>>
Because they have a use case different than yours, simply want to have rapid deployment, or don't want to have to spend hours fucking with shitty OOP implementations.

It's an interpreted programming language, by the way. Not a scripting language.
>>
>>57088424
>It's an interpreted programming language, by the way. Not a scripting language.

nice shot at sounding smart but there the same thing

https://ubuntuforums.org/showthread.php?t=2073273
>>
>>57087993
they dont write real applications with python only scripts.
there will be probably some fag who say but hey anon theres this guy who... then he is retarded.
of course you can dig a hole with a spoon but then again it is fucking retarded.
>>
>>57087993
/g/ is full of memers who claim Java is shit and Python is the next coming
>>
>>57088508
what makes me laugh is people say java is slow then use something like python which is literally 10x slower than java (which isnt actually slow these days anyway)
>>
Python is like Basic, only for kids who want to think theyre cool
>>
>>57088545
Are there any true comparisons between native performance and modern java performance?
>>
>>57087993
POO IN THE LOO PAJEET
>>
>>57088457
https://en.wikipedia.org/wiki/Scripting_language
>ubuntuforums is viable source
>>
>>57088577
Or for people who work with BI, then R or Python is the way to go.
>>
>>57087993
Python is a neat little language and it ties in very well with bash scripting. Also there are great libraries for bioinformatics.

Basically they need other things done than you in a faster manner. But Java is a great language, so keep going. It gets really interesting once you get into more advanced concepts such as database connections etc.
>>
>>57088497
>>57088508
>>57088577
this, if you're not using java or at LEAST c# then you are a hipster cuck nu-male "software artisan", who probably donated to bernie
>>
>the IDE is awesome and I can pretty much build any kind of application, with a GUI or without.
Sure thing pajeet.

Spoiler alert, different languages have pros and cons.
>Are they just too lazy to actually use a real language that is compiled
The assumptions in this statement show the special kind of retard you are. You know, you could find out why people use other languages by fucking learning them and using them a little.
I mean, by your (lack of) logic, why doesn't everyone use C, are they just too lazy to use a REAL MANS language or what?
>>
>>57087993
> unironically enjoying java development

Enjoy your future career:

https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
>>
>>57088596
KEK
>>
Well python is a good language, unlike java.
>>
>>57088652
>>57088596

i don't get it, whats the connection between java and indians?
>>
>>57088724
you are, pajeet
>>
File: 1468698066179.png (248KB, 449x500px)
1468698066179.png
248KB, 449x500px
>>57087993
Actual engineer here (mechanical), not the fake "software" engineers that are a dollar a dozen.

The only programming language you actually need to design something in the real world is MATLAB. Everything else is basically for outsourced sweatshop work.
>>
>>57088704
Okay then, design an actual enterprise scale application in Python with strict typing and compile time bug checking.

Pro-tip: you can't. Now go back to your intro to computing 101 class, this thread is a conversation between actual software professionals.
>>
>>57088749
Thanks Anon, I actually learned a new language name today.
>>
>>57088771
I am an actual software professional and am using python at my job.
>>
>>57087993
java sucks ass here are my complains, i go from the most obvious ones to some subjective ones.

>no proper package manager
>SomeFuckingThingService someFuckingThingService = new SomeFuckingThingService()
>you have to use classes to package your code together not the approriate mean of abstraction, like i sometimes want to just have a standalone function, please?
>you are FORCED to use a IDE
>a supposedly popular language has literally no user friendly tutorials, it might be a issue with google always throwing me into the oracle docs (which present you screenshots of windows fucking XP) but still i would prefer a blog with pictures and stuff

now that we have .net core and all, can't you just fags all just move it? and if you need a dekstop application just use electron with typescript and react. its so fucking good compared to the java crap im forced to do for a living. any java advocate has to hung on some sort day of the rope.

glad i have /g/ and i can let my frustrations out. don't take it seriously, im probably just a bit annoyed because i got kinda forced into the languge with the new company's project.
>>
>>57088771
this
>>
File: 1464573690495.jpg (5KB, 250x215px)
1464573690495.jpg
5KB, 250x215px
>>57088786
> I'm a professional banker and I wear a clip on tie every day

this is literally what you sound like
>>
>>57088798
> >you are FORCED to use a IDE

you can just use javac to compile
>>
>>57088838
Fuck off pajeet.
>>
>>57088798
>no proper package manager

It's called Maven

>SomeFuckingThingService someFuckingThingService = new SomeFuckingThingService()

don't be afraid of some structure. in one look, I know exactly what this is supposed to do, I don't even need comments, it's self documenting

>you have to use classes to package your code together not the approriate mean of abstraction, like i sometimes want to just have a standalone function, please?

proper object orientation has been the dominant paradigm for two decades at least. its the basis of all modern software design for good reason.

> you are FORCED to use a IDE
you say that like its a bad thing. Eclipse is the shit and is an amazing piece of engineering

> a supposedly popular language has literally no user friendly tutorials, it might be a issue with google always throwing me into the oracle docs (which present you screenshots of windows fucking XP) but still i would prefer a blog with pictures and stuff

I can't even tell if you're serious at this point
>>
>>57087993
First java is only compiled to an intermediate byte code, so it more "pseudo" compiled.
Second python is as you said good for scripts.
You will never write stuff you only need once or some prototype and so on in C/C++/Java/C#. Neither will you write programs that only have like 200 LoC.
>>
>>57088641
Are you implying that java is in any way better than C#?
Because it is not.
>>
>>57088771
>Python with strict typing

what is strict typing? is it some python feature or do you mean static typing?

>compile time bug checking.

java doesn't do that well enough, example: there is no Option<T> type (or anything comperable) and NullPointerExceptions aren't too uncommon as you probably know.

>Pro-tip: you can't. Now go back to your intro to computing 101 class, this thread is a conversation between actual software professionals.

dynamic languages offer you productivy and can be quite managable when you use a microserive RESTful approach (so each part of the app is actually dead simple).


>>57088841
but I want proper and working code completion but apparently its not that easy because of the build tooling fragmentation. Another things is the relative loss of productivity, in dynamic languages you have nice code generatos and CLI first approach, in java at least the libs and tools we use don't have such.
>>
>>57088943
but with modern IDEs there is zero reason to use a scripting language.
>>
>>57088497
I make larger applications using Python.
>>
>>57088545
jokes on you
Python can EASILY be extended to use C or other low-level-ish coding for heavy computing
>>
>>57088971
Writing code in scripting languages still is way faster(unless you go insane and make a big project).
And embedding interpreted scripts into your program still works better than working with compiled code.
>>
>>57089023
>>57089016
guido pls go
>>
>>57088624
>It gets really interesting once you get into more advanced concepts such as database connections etc.
not really

JDBC isn't very nice to work with
especially when you have an Oracle DB at the other end
>>
>>57088961
anotherfag, java is cross platform
>>
>>57089104
so is C#
>>
>>57089120
not completely
>>
>>57089120
different anon here
mono is a hunk of shit and will be for a long time

MS really didn't think it through when they went full "only for windoze" on C#
>>
>>57088900
>It's called Maven

Or gradle or ant. All are fairly complex when compared with the alternatives in the nodejs or dotnet world where you just issue a simple command like npm install and it werks.

>don't be afraid of some structure. in one look, I know exactly what this is supposed to do, I don't even need comments, it's self documenting

you know modern languages have this feature called type interferance

>proper object orientation has been the dominant paradigm for two decades at least. its the basis of all modern software design for good reason.

is a class containing static constants really a class? I thought classes are blueprints. my problem is not OOP, my problem is that i have to abuse syntax. I want a namespace or a package kind of thing. I don't want to label something a class which clearly is not a one.

>I can't even tell if you're serious at this point

I might be spoiled but compared with the tuts on the Web stuff the java stuff is really bad. At least maybe in the thing I have to use currently which is JavaFX.
>>
>>57089142
What's wrong with mono exactly?
>>
File: 1442014784773.png (78KB, 747x725px) Image search: [Google]
1442014784773.png
78KB, 747x725px
>>57089120
> M$ loving .NET fags actually believe this
>>
>>57088659


public final class Main {

public static void main(final String[] args) {
final ApplicationContext context = new ClassPathXmlApplicationContext(Constants.SPRING_XML);
final FizzBuzz myFizzBuzz = (FizzBuzz) context.getBean(Constants.STANDARD_FIZZ_BUZZ);
final FizzBuzzUpperLimitParameter fizzBuzzUpperLimit = new DefaultFizzBuzzUpperLimitParameter();
myFizzBuzz.fizzBuzz(fizzBuzzUpperLimit.obtainUpperLimitValue());

((ConfigurableApplicationContext) context).close();

}

}


ayy
>>
>>57088659
>>57089202
>thinking this is difficult or even challenging to work with

this is why you're unemployed lmao
>>
File: 1475963733661.jpg (13KB, 720x415px)
1475963733661.jpg
13KB, 720x415px
>>57088597
>nice shot at sounding smart
>but there the same thing
>>
>>57089241
>check the code
>has classes which sole purpose is to return each of fizz, buzz and fizzbuzz
>>
>>57089345
when you work on a real world project involving > 1M lines of code and >30k classes, maybe then you'll actually understand. Until then, you're a hobbyist at best.
>>
>>57089345
take that code with a bag of salt

someone basically took a Java framework and wiped their ass with it in order to make it look as bad as possible
professional code is nowhere near this bad, even if written in 2002
>>
>>57089371
I sincerely hope this is bait.
>>
>>57088592
http://benchmarksgame.alioth.debian.org/u64q/which-programs-are-fastest.html

Handcrafted top of class C is generally ~twice as fast in special numeric benchmarks.
In real world applications the distance is probably much lower and there are some situations and benchmarks where Java is faster, like heap allocations or super synthetic benchmarks.
>>
>>57089508
Then we have this lengthy article:
http://www.javaworld.com/article/2076593/performance-tests-show-java-as-fast-as-c--.html?page=2
>>
>>57089371
Ever heard of diminishing marginal returns? At a certain point, adding needless classes will have the opposite of the intended effect and make your code hard to maintain.
>>
>>57087993
You might do it because it's easy to use for a quick and simple job. Languages like that have a place, not everything needs to be good for large scale applications.
>>
>>57087993

Why would you chose Java over Python?
If the speed doens't matter (and it doesn't matter unless you do some heavy computation) Python is faster to type and more beautiful..

public class HelloWorld {
public static void main (String[] args) {
int myCounter = 0;
String myString = String.valueOf(myCounter);
if (myString.equals("0")) {
for (int i = 1; i < 10; i++) {
System.out.println(i);
}
}
}
}


vs.

myCounter = 0
myString = str(myCounter)
if myString == "0":
for i in range(1,10):
print i
>>
>>57089023
say what you are saying is rather than use one language, java, you can use two languages to do the same thing?!? wow fucking genius.
>>
>>57088786
"""professional"""
>>
>>57089676
>and more beautiful
what the fuck does that even mean?

are you triggered by curly braces? that would make sense, since python always looked like the kotaku sjw of coding languages
>>
>>57088724

>whats the connection between java and indians?

Butthurt 'murricans because a lot of Java jobs in the US got outsourced because indians are cheaper.
>>
>>57089676
purely procedural code done in an oop-language is going to look like shit in comparison forever and ever
the use of brackets is actually good if you have any experience in programming
types explicitly written out are actually good
the iteration by 1 is explicit vs implicit, how about you change it to let's say 5? what then? your pretty little idiom is not so pretty anymore
where are you printing to? maybe you want to print to .err instead of out? maybe you don't want to print a line, but something else... babbis pretty example need some mods doesn't it

tl;dr ultra shit cherrypicked example by python nooblet

and i don't even like java lol
>>
>>57089776

>what the fuck does that even mean?

>11 lines Java code, 264 chars (including whitespace)
>5 lines Python code, 95 chars (including whitespace)

do the math
>>
>>57087993
#!/usr/bin/python
You can't do that with java.
>>
>>57089828
how about i #define that as a macro in C and use only one letter to for my pre-processor and call it more "beautiful"
1 < what ever you can do

this is literally how fucking retarded you sound
>>
>>57089812

Well guess what?
I don't even like Python.
>>
>>57089776
Python != Ruby
>>
>Make witty quip about "lol java is bad"
>get called out for the shitter you are
>pajeet

wow /g/ is trash
>>
>>57087993
Because it reduces development time, and in some cases the trade off between development time and execution time is highly worth it.

I am a firmware developer for a company where we mainly use C and Assembly, but I use Python from time to time to automate the build process, analyze data, and experiment with signal processing algorithms before implementing them in assembly, which takes a long ass time.
>>
>>57088838
That doesn't seem like such a silly response when he is responding to the statement: Professional bankers cannot wear clips on their ties.
>>
>>57089901

Ruby has curly braces, moron.
>>
>>57088596
>wikipedia is a reliable source
>>
>>57089972
>automate the build process, analyze data, and experiment with signal processing algorithms

all of which would be provably faster running in java
>>
>>57088967
>but I want proper and working code completion but apparently its not that easy because of the build tooling fragmentation.

well, you could build with maven and write script for it:
#!/bin/sh
cd ~/workspace/projectfolder &&
mvn clean install -DskipTests &&
cd target &&
java -jar projectname*

and you are done,
>>
>>57088457
nice shot at showing everyone you are new to programming and don't understand much.
>>
>>57090469
>signal processing algorithms
>Java
pls anon, it is hurting too much, pls stop
>>
>>57089181
Not entirely sure but I think they kept a chunk of .NET proprietary. Things like coroutines and other small features were missing iirc but I gave up when I ran into a bunch of technical issues with the mono compiler which were likely my fault due to how I built the toolchain.

I program exclusively in Lua now :^)
>>
>>57090541
did you even take 10 seconds to google?

http://www.source-code.biz/dsp/java/
>>
>>57089016
the only way you could be more retarded is if you wrote an electron app i guess
>>
>>57090541
>Java
>largest community in existence
>biggest amount of libraries and frameworks
>JVM platform with a ton of derived languages

>not having something python has

did you even think at all before posting this?
>>
>>57090692
It's either bait, or he lives in 1996 when the only language that could do anything fast was C, ASM, and Pascal
>>
File: 1453902382561.jpg (8KB, 290x319px)
1453902382561.jpg
8KB, 290x319px
>>57090662
>electron app
literally cuckolding: the meme framework
>>
>>57090615
as an EE, this looks to be the most verbose and klugy piece of shit that I've ever seen. try again.
>>
>>57089202
use the code balise ffs
>>
>>57088749
it just (Math)Werks
>>
>>57088771
>strict typing and compile time bug checking

if by strict typing you mean static typing, use Cython. You get all the beauty of python, but can declare your types whenever you want, can compile, and can produce C or C++ code.

Also
>not being a JavaScript ninja

it's like you people don't want to find jobs easily.
>>
>>57090997
>not being a JavaScript ninja
>not being sysadmin with shitload of freetime to do side projects in whatever language you like
>>
>>57089066
I use JDBI and it's great
>>
Pajeet the thread
>>
>>57089812
>how about you change it to let's say 5? what then? your pretty little idiom is not so pretty anymore
for i in (1,101,5)


>maybe you want to print to .err instead of out?
print >> sys.stderr, i
in Python2 or
print(i, file=sys.stderr)
in Python3.

I don't particularly like Python or know it very well but your "arguments" are absolutely retarded.
>>
>>57087993
>the IDE is awesome
i hope you don't think Eclipse is awesome
>>
>>57090068
>I can't read
Are you retarded?
>>
>neither Python nor Java have tail-call recursion optimization
>nobody here /c++/
y tho
>>
>>57089371
your project needs to be decomposed into multiple, smaller projects.

i'll send you and your company my consultation bill.
>>
I have a project in java which is a few KLOC, to accomplish a task.

I was able to create a program in python to do the same (kind of, the scope was reduced a fair bit since it didn't need to have the same multicore and resiliency requirements as the java program since it was a demonstration for a class I was teaching) task in less than 300 lines of python, including documentation.

Basically, it's excellent for rapid prototyping, simple scripts, scientific computing, etc. but not so good for enterprise-type tasks.
>>
>>57088605
>BI

That's too broad a definition of BI. You're thinking "real" data science, where statistical models are applied to cleaned data sources. BI is munging data and putting it into sources meant for big data reads, up until creating reports and administrating a reporting server. BI isn't at all the same as building statistical models, they just happen to share some tools (not R, python could be used for scripting ETL processes, but I'm guessing you're thinking of the statistical packages for it), and data science often relies on BI to provide a place to read data from.

For actual BI: Java (Cognos, most open source stuff), Scala (a lot of Hadoop map/reduce shit), possibly C# (Tableau) are probably what you're going for because everything is programmed in it.
>>
Python is wonderful
>>
>>57087993
Good bait.
>>
>>57088798
>if you need a dekstop application just use electron with typescript and react
get a load of this faggot
>>
>>57087993
Because you have to write thousands of LOC for even the smallest retarded thing you wanna do. And this really hinders you in large scale projects. Scala is an order of magnitude better. And Clojure is an order of magnitude better than Scala.

Because JVM. That shit is literally built to be the worst possible VM to run code in ever - and the funny part is that you can't actually change it because of retrocompatibility. For instance - JVM will never have TCO because of this.

Because OOP - the worst kind of it. What java authors had in mind is something different from what the creators of the paradigm had. The result? Awfully implemented static single-inheritance OOP-ish paradigm that sets shitloads of constraints on the way the application is engineered hindering the future design. Composition over inheritance? Cool - except it's not complete as a solution, and will only alleviate your suffering while trying to understand the architecture of the project you're working on.

And, if the customer decides to implement a feature that breaks the current object hierarchy, pray your fucking divinity whatever it is that the ticket doesn't get assigned to you, - because otherwise MONTHS of excruciating refactoring pile of shit are waiting for you to dive in. And, you're not even sure to succeed - not everyone is the fucking meganinjarockstar developer. You WILL encounter shitloads of undocumented and uncommented pajeet-tier spaghetti on your way to the ticket completion.

Learn it though: it's useful to know one of the most used prog langs in the world. But, if you really wanna have fun while programming, here is my advice - steer clear from that pile of crap. Or, if you REALLY need to use it - be sure that you're gonna work only with top-notch programmers, otherwise it'll be a tough ride.
>>
>>57088771
you bunch of faggots are really dense if you think that the static typing is still useful in the real world modern applications.

Have you ever asked yourself what's the static typing for?
>>
>only knows Java so far
>newbie
>dissing on another language already like he knows shit
Go back to class, son. Come back when you graduate, then get at least mid-entry job.
Thread posts: 102
Thread images: 6


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.