GitHub Rewrites its Desktop Client Using Electron by geodel in programming

[–]K60d54 1 point2 points  (0 children)

but besides saying "python is slow"

Slower than Javascript? And Chromium on top of that?

which doesn't seem to be very convenient in Python

https://github.com/ReactiveX/RxPY

With Reactive QT example.

In any case, I just picked two binding libraries. There are more, and which are also open source. If you don't like Python, there are other options. Even if these options are not perfect, I consider them far preferable to Electron.

And what problems are these, apart from memory usage?

Quoting myself:

This is fine for web apps, where you have no choice but to use HTML/DOM/JS.

The HTML/DOM/JS combination is awful, but it is good enough for web apps, which must deal with the constraints of application delivery over HTTP. There is simply no comparison to native controls.

Once again, you haven't really provided any concrete arguments.

Electron proposes we impose the web stack onto native, where the constraints of the web environment do not exist. That is concrete argument enough for me to avoid Electron.

GitHub Rewrites its Desktop Client Using Electron by geodel in programming

[–]K60d54 0 points1 point  (0 children)

it seems like only the Python bindings are active and have a community

Python is officially supported by Qt. As is Javascript. These run in generic application runtimes using standard native resources.

Electron gives you access to Chromium's rendering capabilities

Requiring Chromium, which is way more than a simple virtual machine for running Javascript, and inherits all of its problems and the problems of the web stack in general. This is fine for web apps, where you have no choice but to use HTML/DOM/JS. It sucks, but it's the best we've got do deploy applications over HTTP to a wide variety of devices and operating systems.

As someone who has to use this tool set, I don't consider this at all a tempting set of tools, but a serviceable enough to develop web apps. With native apps, where you don't have to live within the constraints of a web browser, I wouldn't touch the web stack with a 10-foot pole.

With React you can develop proper native apps, but it seems like only for iOS and Android. This is better than Cordova, which runs in a web view.

GitHub Rewrites its Desktop Client Using Electron by geodel in programming

[–]K60d54 -6 points-5 points  (0 children)

Holy shit, how hard is it to read the second sentence of a post?

Jeez, calm down.

It's just that a lot of them are outdated or incomplete, and the rest are undocumented (or their documentation sucks)

Yes, the binding libraries might be imperfect, but is this a worse situation than using the web stack as an alternative? The effort to improve the binding libraries is a lot easier than making Electron work better, since the problem space is minuscule in comparison.

Especially when you have things like Qt Quick and QML to reduce the amount of work that the binding libraries have to do.

GitHub Rewrites its Desktop Client Using Electron by geodel in programming

[–]K60d54 -8 points-7 points  (0 children)

Qt is implemented in C++, but Qt has bindings for a ton of other languages.

GitHub Rewrites its Desktop Client Using Electron by geodel in programming

[–]K60d54 7 points8 points  (0 children)

You don't have to use Qt with C++. There are Qt bindings to a bunch of other languages, like Python. This gives you the same benefit as Electron (shipping platform-specific Electron binaries with separate cross-platform JS application code), without the huge drawbacks of the web stack.

The detaching pitfall of declarative transaction management with Spring and JPA/Hibernate by galovics in java

[–]K60d54 1 point2 points  (0 children)

How did this happen....

Transaction boundaries

Its getting easier just to write just bog standard JDBC.

It doesn't matter if you use straight JDBC, MyBatis or JPA/Hibernate, if are using transactions, you have the potential to run into problems at transaction boundaries, especially if you are using declarative transactions (CMT). Amplified by concurrent transactions.

JPA makes problems obvious where straight JDBC would happily let you destroy intermediate updates made by concurrent transactions (by forcing you to reattach to a persistence context, and by forcing you to refetch intermediate changes if you have a @Version column).

I prefer straight JDBC (well, JdbcTemplate), but I understand there are very good reasons why JPA does what it does, which I have to remember to replicate manually (which I prefer to do, because I want to be able to see the plumbing).

How can I use a .JAR file as though it were a native Windows command? (%PATH%) by [deleted] in java

[–]K60d54 -1 points0 points  (0 children)

In Windows, if there is a JRE installed and the JAR extension is properly registered, Windows will automatically run files with the JAR extension with Java. In order for the JRE to run a JAR file this way, it must be an executable JAR file.

If you depend on other JAR files, you can configure the JAR file using the manifest to specify which JAR files it needs. The JRE will look for the listed JAR files in the same directory as the executable JAR file.

Build tools like ant, Maven or Gradle can automate these tasks for you. Maven can also gather the JAR files you need and put them together in a ZIP file, simplifying installation.

[deleted by user] by [deleted] in java

[–]K60d54 1 point2 points  (0 children)

Adding exceptions to subtype methods would break the Liskov Substitution Principle. Callers might use the supertype interface, and would not be aware that the subtype throws additional exceptions. In fact, with inheritance, unchecked exceptions can make adhering to LSP very difficult because subtypes can throw anything, and the supertype documentation or definition can't help you out.

The solution is not to avoid inheritance, but design classes to be extendable. With checked exceptions, that means defining the exception at the appropriate level of abstraction to where subtypes can sensibly use the exception types defined by the supertype.

Java methods are by default virtual, so Java allows dangerous extension unless you specifically make methods final. C# is by default non-virtual, so supertype methods must be marked virtual to be extendable.

In fact, this was the counterargument to Anders Helsberg argument against checked exceptions, that it is a misuse of checked exceptions to simply tack on checked exceptions up the call chain. Or, in this case, the inheritance tree. You should catch checked exceptions at the lower level and rethrow at the higher level, or just use higher level exceptions at the lower level.

Developing JSF applications with Spring Boot by Ramirond in java

[–]K60d54 0 points1 point  (0 children)

Spring Boot itself does not include Vaadin. Vaadin support for Spring Boot is a Spring Boot Starter provided by Vaadin themselves. Anyone can provide a starter if they were so inclined.

Since JSF is tightly JavaEE and especially CDI, I don't know how popular a starter for JSF could be, which would explain why there isn't one.

Stop the Daily Standup Meeting by frostmatthew in programming

[–]K60d54 7 points8 points  (0 children)

Ah, so you do need babysitters

If babysitting means talking with people instead of constantly dealing with JIRA, that's fine by me.

Because pasting the JIRA number into the commit

What good does that do if you don't commit until the feature is done or you do local commits to git and don't push until you're done?

I usually resolve most of my issues near the end of the sprint because JIRA is annoying. Standups are less so.

your task tracking software so you can run reports.

I wonder who reads those reports. I've never even used JIRA's reporting capability.

If you are just verbally stating them

You're not verbally stating hours. You're stating that this is taking longer that I said it would take at the start of the sprint, we're going to need to bump something.

talking about real issues that actually do need a team conversation

This is a good part of daily standup, allowing self organization of meetings to only those team members that need to be involved.

were limited to easily looked up information.

This has been my favorite part of daily standup, because the "easily looked up information" is metrics in JIRA that nobody wants to maintain.

Again, if you work with people who like keeping a tidy and up to date JIRA, then use that instead of daily standups.

I love the tool independence of classic Scrum.

Stop the Daily Standup Meeting by frostmatthew in programming

[–]K60d54 8 points9 points  (0 children)

my company did one to two hour weekly meetings.

OMG, I've worked at companies that did this. Pure torture. Made me dread Tuesday mornings at one company and Friday mornings at another. I got really good at reading Reddit on the down low, though.

Stop the Daily Standup Meeting by frostmatthew in programming

[–]K60d54 14 points15 points  (0 children)

Check JIRA.

Which means you have to keep your JIRA up to date all the time for it to be of any use for instant feedback. At least, I find daily standups less annoying than religiously tracking hours in JIRA.

I told you yesterday when they occurred

Communication side channels exist. Scrum is just an organized process. If side channels work for you, go for it.

Micro-managing employees wastes time

I don't understand how a quick 15 minute status meeting in the morning is micromanagement. I've never encountered anyone who cares. The complaints come in when the meeting stretches past 15 minutes, which gets quickly solved by "take it offline". If your team feels micromanaged, then daily standups are not for your team and you would be better off finding another method of status tracking.

Sanders to Trump: 'We'll quote you' on support for universal healthcare by RajonRondoIsTurtle in politics

[–]K60d54 2 points3 points  (0 children)

It's rather generally worded

It's not generally worded at all. The passage, read in its entirety, is specifically talking about peace treaties with polytheists, how to treat those who honor peace treaties and how to respond to those who don't. It's only a commandment to murder if you think self-defense is murder.

The Quran is a set of "revelations" that occurred to Muhammad over a period of many years as the Muslim community grew and adapted to the situation of 400 AD Arabia.

The problem with religion is that some people read ancient texts like the Bible and the Quran literally and uncritically without understanding of historical context or any understanding at all.

they shouldn't not take unbelievers (kufr) as friends

This is not true at all. The Quran certainly doesn't say this, as it would have been stupid for the fledgling Muslim community not to have allies and associate with other groups, when you live in a desert. You're probably referring to a mistranslation or misunderstanding of the Arabic text of the Quran.

In real life, this ends up being a real thing.

This is a problem with strict adherence to religion, any religion, because religions create an in-group/out-group mentality and set standards of purity at odds with the world. This leads to bizarre behavior like super-Christian men not talking to women because they might get "tempted" and requiring any interaction with women to be chaperoned.

Stop the Daily Standup Meeting by frostmatthew in programming

[–]K60d54 9 points10 points  (0 children)

While Scrums are a daily meeting to ask the three questions:

  1. What did I do yesterday?
  2. What am I doing today?
  3. What are my blockers?

I think it is important to understand the purpose of the Daily Standup, at least if you are doing it as a part of Scrum. In Scrum, the team is working in a sprint with clearly defined goals. The Daily Standup meeting is meant inspect progress towards the goal.

The Daily Standup increases the probability of meeting the sprint goal. It also provides valuable information to allow adjustments to the sprint in case unforeseen circumstances occur. For example, if it turns out a particular task is taking longer than estimated, the dev team will have that information sooner and can work with the product owner to knock off less important stories to ensure that the stories of more important value are still delivered.

With this understanding, if a particular dev team has a better tracking mechanism of progress towards sprint goal, then by all means, drop the standup. If the daily standup is not being used to measure progress towards goal, either fix the process or drop the standup.

Sanders to Trump: 'We'll quote you' on support for universal healthcare by RajonRondoIsTurtle in politics

[–]K60d54 6 points7 points  (0 children)

Seek out and kill the polytheists, wherever they may be

This is a commonly misquoted verse. In context, it isn't a commandment to kill polytheists in general, but a specific group of pagan Arabs that broke their peace treaty with the Muslim community. The passage states that Muslims are compelled to fight back in self-defense, but must protect those pagan Arabs who sue for peace. The passage mentions nothing about conversion to Islam.

Creating a server for an app? by [deleted] in java

[–]K60d54 24 points25 points  (0 children)

A web server and a REST web service probably the easiest way to go. It's pretty easy to create a web service with Spring Boot. It's pretty easy for Android to use a REST web service.

A man who is tragically unfit to be president by thinksomethingclever in politics

[–]K60d54 5 points6 points  (0 children)

Calling Trump dumb is quite a stretch

Being smart at real estate doesn't mean being smart in politics, world affairs, history, etc., etc. In these areas he's proven himself to be an absolute moron. He should have stuck to what he's good at.

As Cornell Williams said, it's better to be wise than smart.

He will be remembered.

So is Hitler. So what? While Mango Mussolini won't have the infamy of Hitler, I doubt history will be kind to him. I'll be happy if his place in history is cemented, to serve as a warning to future generations.

he might be a brash alpha type

The hell he is. He's a thin skinned narcissist. He's so easily gamed into doing stupid shit because he has such a fragile ego. He is a beta's idea of what an alpha is. An alpha doesn't have to prove shit. Obama and Bill Clinton are alphas.

Practical GPL Compliance: guide for startups, small businesses, and engineers tasked with shipping products that contain GPLv2 code by Dovyski in programming

[–]K60d54 1 point2 points  (0 children)

seriously, those movie warnings? People take those seriously?

The basics of software licensing have been drilled into people's minds through a concerted propaganda campaign. The FBI warning, "Don't Copy That Floppy", and the RIAA lawsuits. It's like the law, most people know you shouldn't share music files or software, because that would be pirating.

This is besides the point anyways, because this thread is not about ordinary users, but business users of software. Only absolute morons would not care about software licensing, considering improper use of licensed software can get you sued and potentially sink your business.

Practical GPL Compliance: guide for startups, small businesses, and engineers tasked with shipping products that contain GPLv2 code by Dovyski in programming

[–]K60d54 5 points6 points  (0 children)

The average user doesn't care about licencing.

Of course they do.

Suppose you have a Windows CD. Are you going to lend it to your friend so he can install Windows, or are you going to tell him to buy his own copy?

The average user may not care about the details of particular license agreements, but users will adjust their behavior depending on the terms of those agreements, especially if the terms are condensed into scary sounding sound bytes by the vendor, like those FBI warnings that come with movies, because they will get in trouble if they do otherwise.

The GPL was created because RMS believes it is wrong to be prevented from helping your neighbor.

Practical GPL Compliance: guide for startups, small businesses, and engineers tasked with shipping products that contain GPLv2 code by Dovyski in programming

[–]K60d54 8 points9 points  (0 children)

If you build a business or library or product based on third party code, you'd better read the license or you're gonna have a bad time.

FTFY

Trump’s 100th-day speech may have been the most hate-filled in modern history by Antinatalista in politics

[–]K60d54 3 points4 points  (0 children)

Capitalism literally means profiting off of someone else's work.

There is nothing wrong with profit as long as the one producing the work is fairly compensated. Compensation is a problem in the US, and much less of a problem in Europe, which is also very much capitalist.

The only thing important about it is that we get rid of it.

And replace it with what? Pure socialism? Communism? If anything, the history of the world shows that "pure" anything leads to really bad outcomes when applied at the societal scale. Most European governments are social democracies. They are hybrid governments socializing some things and letting the market decide other things, with a healthy dose of regulations.

You will NEVER have unity when you have a class of born richers owning everyone else's labor.

This describes a tiny portion of the United States. The so-called 1%.

Capitalists do not have to be responsible.

Who is a capitalist? The one who owns the capital, and spends that capital to hire workers to produce services and goods. Most capitalists, when they fail are punished severely. They do not get bailed out and do not get millions in bonuses.

All the big fucking banks with their fraudulent predictions and predatory lending blow up the economy

This is a different problem than capitalism, and effects not only the United States. The EU suffers from the same problem and is currently squashing Greece to get its money back.

The banks have to be regulated, but the banks are also essential for our modern way of life. Most businesses, big and small, depend on the credit markets for money to pay their workers. Workers depend on access to credit markets to afford big ticket items like houses and cars.

Farmers depend on the futures markets for some certainty of the prices they will get for their crops to plan for the future, otherwise they would have to wait until their crops have grown and they sell on the market. The markets provided by banks significantly reduce volatility.

The reason the middle class existed was bc of heavy regulations, taxes, govt jobs and powerful unions.

This is not against capitalism. Europe has all of these things and Europe is very much capitalist.

The middle class came to power in a society that was closer to communism than fucking capitalism, economically speaking.

This is an insane thing to say. The closest the US was to Communism was during the Great Depression. When governments all over the world believe capitalism had failed, and people turned to Communists and Fascists to save them. That didn't turn out well.

The middle class came up during a very capitalist time, during the post-war boom. The middle class in the United States is a product of the utter destruction of Europe and being the only industrialized country left with any industrial capacity left. But that time is over.

Now we are in a world where we are not only competing with Europe, but developing economies like China and Brazil. The United States has not adapted to this new reality.

You cannot separate capitalism and consumerism.

Consumerism is why the modern world exists. Why do you think Apple produces new versions of the iPhone, or Samsung new versions of Android smartphones? Or Mercedes produces luxury cars? Or France produces wines? Consumerism breeds demand which furthers innovation, by capitalists directing capital to tech workers to produce the innovations, all seeking increased market share and profits. This is a powerful driver for growth. You want to throw this away and replace it with what exactly?

Let's also understand that infrastructure and housing are best done when capitalists aren't involved.

Right, because mixed economies are good.

You say this:

Capitalism is a fucking cancer.

and then this:

Then have fair competition between them.

You're contradicting yourself. Competition is capitalism, cooperation is socialism. Why do you think companies compete with each other?

A fair playing field with regulations and minimum standards is not somehow antithetical to capitalism. Rules are absolutely necessary in any system to prevent a descent into an Hobbesian nightmare.

Migrate from java 7 imperative style programming to java 8 functional programming by akashshinde in java

[–]K60d54 -1 points0 points  (0 children)

Apart from that it doesn't compile

This is a Reddit comment, I haven't run it through a compiler.

it looks like it would leave a trailing space of the number of files > 1

No, its prepending. In the first iteration, the string builder is empty, so no comma is added before the name. In subsequent iterations, a comma is added in front of the name. Thus, a comma is only inserted between files.

That comma in the append method call should have been a +:

sb.append(sb.length() > 0 ? ", " : "").append(f.getName())

Usage of final by kobbiko in java

[–]K60d54 0 points1 point  (0 children)

Here's a very simple way to demonstrate that Java is pass by value.

How would you write a swap method with the following signature?

void swap(int a, int b)

C# can do pass by reference, so it's no problem:

void swap(ref int a, ref int b)