« first day (818 days earlier)      last day (3205 days later) » 

12:00 AM
RELOAD!
 
welcome back @JeroenVannevel
3
 
INTERRUPT
 
There are 1416 unanswered questions (94.5097% answered)
 
How dare you greet me
The audacity
I'm not back though -- Monday I will be
 
I won't do it again until I have 20k rep, sorry
:)
 
12:01 AM
@Hosch250 Speaking of bounties, I happened to find an old link-only answer on SO that had a +200 bounty on it. Both links were dead, and after flagging it for removal, the user lost all 200 rep.
 
Yeah, I noticed I'm falli'ng behind onrep
What's up with that?
Cut it out, all of you
3
 
Well, presumably you've not been active, and we have.
 
@Jamal Link?
 
Yeah but usually my inactivity has greater yields than your activity
hohoho
 
I've never used it, but I think that codereview.stackexchange.com is the place for this sort of question. — R2-Dequeue 2 mins ago
 
lol I can't see removed posts on SO
 
Me, neither.
 
Anyone wanna help out here?
 
@Jamal lol that sucks....lol
 
@SirPython Well, you can always just join the the Tavern on the Meta room and help watch the Smoke Detector.
 
12:07 AM
@Hosch250 I've never heard of that before. I'll go check it out.
 
@SirPython Seems a lot of effort for little gain
 
8
Q: Multi-layer PyQt4 image viewer performance improvement

AjeanI have written a functional GUI program using PyQt4, and I'm looking for some feedback because it's not as fast as I would like. It takes in some number of large, same-sized 2D arrays and displays a sub-image of each one in its own sub-window - at full resolution or only zoomed by a factor of 2 ...

How about that one?
The message with the most stars gets the bounty.
 
Just bounty my answers
Restore order to the universe
 
@JeroenVannevel The idea is to help certain old questions get bounties, but I agree that your answers are top notch.
I'll give you a vote.
 
12:11 AM
Hold your horses
Are you saying you hadn't already upvoted them organically?
I am appalled
 
Organically? No.
Also, I haven't read all your answers - you were here before I was, and I don't have a feed on your account's activity.
 
Well there's the issue
 
OK, guys, here is the bounty. Get humping!
9
Q: Multi-layer PyQt4 image viewer performance improvement

AjeanI have written a functional GUI program using PyQt4, and I'm looking for some feedback because it's not as fast as I would like. It takes in some number of large, same-sized 2D arrays and displays a sub-image of each one in its own sub-window - at full resolution or only zoomed by a factor of 2 ...

 
I'm not sure when or if I'll ever feel like replying to this question... but it's got some easy things to comment on like spacing, indentation, terrible comments, and questionable method names (loadObjects() does UI stuff? tableRefresh() does asynchronous data loading?)
2
Q: Using Grand Central Dispatch to fetch data from Parse.com and update UI asynchronously

PSU SabesThis works, and the UI is snappy in the simulator, but since this is my first time really using GCD, I'd just like this code to be reviewed before I start using it everywhere. Note that this is inside a PFQueryTableViewController my function func tableRefresh() { // get quality of...

 
@nhgrif I'll take it.
 
12:18 AM
I have to write some proof-of-concept code because our current client thinks we're morans
Or... maybe not that so much as just don't think there's any chance we'll be capable of thinking of solutions they haven't thought of
 
@Mast Congrats!
 
NVM, found it.
 
@SirPython Thank you
 
@Mast Nice work, you suck.
I still don't have that badge. I am not as crazy as the rest of you.
 
12:34 AM
@Malachi Real life almost stood in the way, but I'm too resilient for that.
 
the time difference always trips me up. between my time zone and UTC
 
The trick is checking roughly every 12 hours ^^
 
Resets at 7PM here.
 
2 AM here.
 
The trick is, check once a day at a specific time.
If you can't do that, then just be on all day.
 
12:36 AM
@Hosch250 That's your tactic?
 
Yup.
 
@Hosch250 here too
 
But, I got it a while ago.
 
where you from @Hosch250?
 
MN.
 
12:37 AM
I think I can get Marshal within a month, I'm almost at 50%. Strunk&White is at 53/80.
Re-tags don't count...
 
oh yeah you and @EthanBierlein are Minnesotans.
 
@Mast You should be able to get it in a couple weeks.
@Malachi You too, originally.
 
I too am originally from Minnesota
lol
 
Good.
But... I'd remove the output stuff.
This is an iOS app, so any output is there solely for debugging purposes
 
12:42 AM
OK.
I read a bit about the GCD in my OS internals book. We mostly focused on general problems, with Linux for real life.
If I was writing this story, I'd make it a story of resistance against overwhelming odds, with the inevitable success at the end: worldbuilding.stackexchange.com/questions/21565/…
 
0
A: Prevent users from supplying emails

MastI agree e-mail addresses should not be posted. However, such a filter would undoubtedly hit a lot of innocent posts as well. I do not dare to guess how many posts there are on SO alone about matching e-mail addresses. Communicating about such questions and answers is going to get though if you f...

 
12:57 AM
0
Q: Knockout after-school implementation

Edson AlcaláI'm just starting with knockout, it would be nice to have a feedback, thanks in advance. Here is my code JavaScript 'use strict'; (function ($, ko) { var init = function () { registerCustomBindings(); var initialData = getData(); var dayInformation = initialData.DayInfo; va...

0
Q: Finding items of related dependencies in Factorio

milleniumbugFactorio is a game about building factories and about automation. Items can be crafted (just like Minecraft) yourself, or automated by assembling machines. To help me expand my factories I created a little script in Python 3 that shows me what other items that I can produce once I create factory ...

 
1:28 AM
@SirPython I got 85 meta rep so far from that answer ^^
TTGTB
 
 
1 hour later…
2:29 AM
If the answer comes "straight from the forum", please provide a link in your answer. Was it this? codereview.stackexchange.com/questions/13086/…m69 8 secs ago
 
 
1 hour later…
3:36 AM
@200_success One important question wrt exceptions in this code that is reviewed.
I learnt here that In reality most applications will have to recover from pretty much all exceptions. both checked & unchecked like NullPointerException/NoSuchElementException/UnSupportedOperatorException etc...
 
@overexchange Yes, that is true. However, not all exceptions can be successfully handled, not all possible exceptions are known, and not all possible exception cases are possible.
 
@Hosch250 sorry but 1 second let me complete. i want my comments not to get cluttered in the chat as of now
 
So, if you know there is a section of code that is likely to throw, then catch the exception.
OK.
 
Imagine this code would be sitting in some component here‌​(say).So, at the top level throws clause/catch would be cluttered/messed-up. So, I want to learn exception handling strategy that can propagate exception as shown here
Can somebody help me guide, how do I learn this? In fact it starts with writing some toy app(like exp tree app both GUI and cmd line), If I start writing such app, I need some idea on how to write such exception handling strategy?
 
OK, so there is a fair amount to exception handling, including what you showed there.
 
3:46 AM
ok
 
Exceptions, as a general rule, happen with a single statement.
So, you have your exception, and it throws.
So, assuming you know nothing else is going wrong, you wrap that in a try/catch (usually).
Usually, you just handle it (return false, return null, whatever).
 
my exception(mean exception wrapping) that can take other exceptions as argument(both checked/unchecked)?
class MyException extends Exception{}
 
I use C#, so it is a bit different, usually.
But yes, I believe custom exceptions usually extend Exception.
Sometimes, however, we need to throw from the method to signify a more major error, and let it be handled higher up.
 
I think, unless we write an app, we cannot learn how to handle exceptions, correct?
 
No, not at all.
 
3:50 AM
oh ok
 
In C#, you can handle an exception by calling int.Parse("test").
 
0
Q: Beginner making website any pointers?

NBeraokay so I am teaching myself so web design and im building a random site for fun in dreamweaver. This is what i have to far what do you guys think? Also i am trying to center the container where the images scroll to auto adjust depending on the screen size to the center( so the left and right sid...

 
Of course, "test" can't be parsed to an int, so we have an exception.
 
I want see some java code that can show me such exception handling strategy.
 
You can have lots and lots of exceptions in a simple program.
OK.
At the worst, we can't recover and our best hope is to display a meaningful message to the user and quit.
This doc should have some examples: docs.oracle.com/javase/tutorial/essential/exceptions
 
3:54 AM
having isolated small examples does not help me understand
 
For a simple exception in Java, try creating an off by one error, like `for (int i = 0; i <= list.count; i++) { list[i]; }
Here, I'll create an example in IdeOne.
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		int[] arr = { 0, 1 };

		System.out.println(arr[0]);
		System.out.println(arr[1]);
		System.out.println(arr[2]);
	}
}
That will crash because there is no third value in arr.
	public static void main (String[] args)
	{
		int[] arr = { 0, 1 };

		System.out.println(arr[0]);
		System.out.println(arr[1]);

		try {
			System.out.println(arr[2]);
		} catch(IndexOutOfBoundsException e) {
			System.out.println("Error detected: " + e.getMessage());
		}
	}
That will not crash because I catch the exception.
Sometimes, you need to catch one exception and throw a more meaningful exception to be handled higher up.
This answer makes some good points: stackoverflow.com/a/1070593
About checked/unchecked exceptions and how to implement your own.
If you want to re-throw an exception, that is simple enough too:
class Ideone
{
	public static void main (String[] args)
	{
		int[] arr = { 0, 1 };

		System.out.println(arr[0]);
		System.out.println(arr[1]);

		try {
			System.out.println(arr[2]);
		} catch(IndexOutOfBoundsException e) {
			throw new EmptyStackException();	// just an example, not relevant here
		}
	}
}
 
I don't have Java installed, so I can't provide more details really, I'm just using IdeOne.
 
I wrote such code here
 
4:10 AM
Looks pretty good. Just one thing:
		} catch(SQLException e) {
		    //logger.log(e);

		} catch(IOException e) {
		    //logger.log(e);

		} catch(Exception e) {
		    //logger.severe(e);
		}
You can catch two exceptions in one catch: catch (SQLException|IOException e)
Oh, one other thing:
			if (true){
				throw new SQLException();
			} else{
				throw new IOException();
			}
if (true) is obviously always true, so you can just do throw new SQLException();
And just below that, I see you did combine the exceptions :)
 
this code is as per java training for beginner
 
OK.
The best way to get better is to write code, solve problems, get your code reviewed here, read code (preferably good code), read documentation, and just generally live and breath code.
 
4:25 AM
-2
Q: How can I develop this code more elaborately?

CodeDreamerRecently, I've written a code, which implements sticker window function. There are some duplication codes as you can see. I think this code can be simpler or else other. Could you tell me your thought? Thank you. // If 'rtParent' and 'rtChild' are closed each other as 'ENABLE_STICK_VALUE', retur...

 
Basically am looking for some open source java code that can show me exception handling strategy? I need help on referring such code. I would look into that code, for how exceptions handling strategy is designed.
 
The documentation should cover this thoroughly.
I don't know of any, but a search engine should help too.
 
After seeing the documentation I write this code that talks about templates/handlers etc...
i gave a try to search, but could not find
 
 
2 hours later…
6:25 AM
monking
 
7:20 AM
Monking
 
7:37 AM
Belongs on the Code Review Stack Exchange site. — Mark Seemann 33 secs ago
 
0
Q: Can't get rid of giant gap between two divs

phizzyI'm trying to line up two divs side by side with just a tiny gap between them. I'm new to this but for some reason I cannot eliminate the giant gap between two divs. When I drag the browser window to be smaller the divs close together, but when I have the browser window wider like on a laptop the...

 
7:55 AM
0
Q: Hanoi tower in Java

qedHere is the code: package sample; import java.util.ArrayList; /** * Created by IDEA on 31/07/15. */ public class Hanoi { final ArrayList<Integer> tower1; final ArrayList<Integer> tower2; final ArrayList<Integer> tower3; final ArrayList<ArrayList<Integer>> towers; public ...

 
@MarkSeemann Thanks. How can I move it to the Code Review site? — Bang Jun-young 27 secs ago
 
Greetings
@CaptainObvious Broken code
 
8:34 AM
0
Q: Threadsafe webapplication getParameter()

DiyarbakirI am new to Webapplications and threadsafety. Please, could somebody tell me if the following example is threadsafe? My main concern is that the AClient and ParameterValidator are autowired by Spring as singletons (not threadsafe) and as far as I understand all incoming requests will share the sa...

 
1
Q: PEP8 space after comma

BunykI'm doing code review, and seeing method declarations like that: def __init__(self,data): I always thought that it should be formatted like this: def __init__(self, data): But then I checked PEP 0008 and see no exact statement about that. There is guide about whitespace around operatos, and...

 
0
Q: Interpolate string (c# 6.0 feature) with custom format

SinatrRefactoring some old code with new VS2015. Can't figure out how to use the power of string interpolation here (to remove string.Format): public string AsVolts(double value, string format = "0.0") { if (double.IsNaN(value) || double.IsInfinity(value)) return ""; return string.Form...

 
9:13 AM
1
Q: Efficient generic type conversion between numeric types in F#

Bang Jun-youngIt's easy to write a function that adds two ints in F#: let add x y = x + y Actually it's the same as: let add (x:int) (y:int): int = x + y If you need it to make generic so that it can take arguments of other type than int, you should use inline keyword: > let inline add x y = x + y;; va...

 
9:26 AM
Better on Code review i think. My only advice is not to limit yourself to integer keys - use another generic param to indicate the key type: IGetByIdService<TEntity,TKey>{..}Jamiec 16 secs ago
 
0
Q: Should I convert an entity to a DTO inside a Repository object and return it to the service layer?

Stefan FalkI am trying to get an answer to the two quite similar questions here: Should I convert an entity to a DTO inside a Repository object and return it to the Service Layer? or Is it okay to return DTO objects from the Repository Layer? Right now I am stuck in my Servlet (Servie Layer) th...

 
@Jamiec : code review is for existing, complete, working code. Design questions are more at home at programmers.stackexchange.com imho. — cosmo0 24 secs ago
 
9:44 AM
Monking.
 
hello
 
Monking
 
@StackOverflow superfluous tags
-1
A: PEP8 space after a comma

Andy Kubiakimport this will generate the Zen of Python, which has two relevant lines: Beautiful is better than ugly, and Readability counts. For me, and for many of the projects I touch, this means I should put the space after the comma. Best of luck!

wat
 
Greetings
 
@Quill Haha
 
9:52 AM
@IsmaelMiguel hello
 
I don't know what to say about that (bad) answer
 
Hi
 
I can't read it
English isn't his native language
 
I just edited one of my answers on SO (+3) and immediately received 3 upvotes lol
 
Nice!
 
9:54 AM
@jacwah link
 
6
A: How to make a linux shared object (library) runnable on its own?

jacwahI wrote a blog post on this subject where I go more in depth because I found it intriguing. You can find my original answer below. You can specify a custom entry point to the linker with the -Wl,-e,entry_point option to gcc, where entry_point is the name of the library's "main" function. void...

 
note that when you edit something it hits the recent on the homepage
 
Yeah I know
Just didn't expect it to double
Thanks Santa :)
 
Well, that is an unexpected answer. And It is really good. Even I could understand it!
 
@IsmaelMiguel ^^ that, and that's why it got a ^vote
 
9:56 AM
@Quill +1 From me as well
@jacwah You're welcome
 
Thanks!
 
0
Q: Card data extraction from file

KyleMHBI wrote a quick script and wanted some critique, as I don't get to practice my coding often, or even in one language I might make some idiomatic errors. The program works and runs 145 555 entries (873 330 lines in the original data) in approx 5 seconds. It may run up to a few million entries lat...

 
Any ideas for a polyglot?
By the way
 
C++ in C
 
I have 2 questions with a polyglot function for PHP and Javascript
 
10:02 AM
Yeah, 50-something upvotes on one of them
 
Where?
No, just 3 and 4
That's the views
I wish they had 50 upvotes
That would've been perfect
 
> Without a strong passion for what we do, and for developing your own skills, you'll find the work here too difficult.
This is not a good line to put in a job description
 
Who did that?
 
I just click a random SO Careers link careers.stackoverflow.com/jobs/93829/…
 
Yeah... The whole text has "WEIRD" written all over it
 
10:10 AM
 machine learning startup
sounds ... fun
 
Or weird
 
IDK I think it sounds fun
 
Still weird
There are fun things that are weird
Like going out alone. It's somewhat fun, but weird AF.
 
Monking
100
A: A quick and easy way to join array elements with a separator (the opposite of split) in Java

skiwiUsing Java 8 you can do this in a very clean way: String.join(delimiter, elements); This works in three ways: //directly specifying the elements String joined1 = String.join(",", "a", "b", "c"); //using arrays String[] array = new String[] { "a", "b", "c" }; String joined2 = String.join(",",...

:D :D 100 upvotes
 
Nice
 
10:16 AM
Isn't there a badge for that, 'higher than excepted answer'
 
There is.
 
@skiwi You need to update it
 
That's the populist badge.
 
I'm just being happy with my Great Answer badge
 
I nearly had [badge:] with my answer on Simon's CR shield question
 
10:21 AM
Link?
 
I have a feeling that it's a question that will draw attention over time, and that I'll eventually get it
Oh, I hit 3k as well
 
What language is it?
 
PHP
 
Oh, I remember that question
I got 12 upvotes there.
 
10:49 AM
Question: is a bitwise XOR faster than a "not equal" or than a "lower than"?
 
@IsmaelMiguel You can estimate that any basic operation on integers takes roughly the same time in most systems.
 
Well, that helps a little
 
Sometimes, division and modulo are a bit slower. But comparing the other instructions is micro-optimization. Just go with the more readable one.
 
I wanted to speed up bubble sort
 
Then don't use bubble sort.
 
10:52 AM
It's for re-learning purposes
I'll go crazy and try to re-learn C
And one of the things I wanted to do is to try to make bubblesort faster
 
Anyway, instructions time change depending on the architecture, so there's no definitive answer. Choose the more readable, the one that makes the most sense, and the compiler will be more likely to understand what you're trying to do and to generate the faster code.
 
0
Q: Node.js + MongoDB modify records

JánosI wrote a script do you think it works well. I.e. do I need to close database / connection at the end? The goal is to be able to upsert many records and delete many records in one shoot. Here is is an example HTTP POST request with JSON body to use it: {"db" : "Memorise", "upsert" : [["Diagram"...

 
In your opinion, would a compiler barth on if( n ^ m ){ print("n and m are different"); }?
 
The compiler couldn't care less. The readers on the other hand will wonder what it is you're trying to do.
 
Yeah, you're right about that.
Many people would think I'm insane with such code
 
10:57 AM
I would say that if ( n != m ) could be better for the compiler since you tell it that you want to know whether the variables are differrent. That's an easy job for it and you can be sure that it will use the fastest instruction for the job, be it a XOR or something else.
 
I would say that I have to agree with you
 
If you write if ( n ^ m ), the compiler could understand what you're trying to do, but it's not guaranteed. You will probably end up with a XOR instruction in the lower level, be it the fatest way to do the job or not.
 
It really makes more sense
You are right
 
Anyway, that's not always true, but when talking about algorithms and data structures, think about efficiency, not about performance.
 
This question, in it's current form, is not a great fit for Stack Overflow. Asking whether something is "the best"/ or asking what is "the best" is always leads to opinion based answers. Please isolate the issue at hand, or consider asking your question on codereview.stackexchange.comMatt ♦ 9 secs ago
 
11:01 AM
Aren't those the same?
 
Nope.
 
Efficiency is doing less wotk for the same result. Performance is doing the same job, but doing it faster.
 
Oh
That makes sense
 
For example, a heapsort is more efficient than an insertion sort. But if you don't have many values, the insertion sort might be more performant.
Efficiency is more or less about big O complexity.
 
11:03 AM
I tried to understand bigO complexity
My brain wraps around it and quits
 
Other example: adding and removing elements in the middle of a list is more efficient than doing the same thing in the middle of a vector. However, if your elements are small (integers), adding and removing elements in the middle of a vector will likely be faster than in a list due to better caching.
 
What's the difference between a list and a vector?
Aren't those arrays?
 
An std::vector (I used the C++ terminology, sorry) is a contiguous array of elements in memory.
 
Still an array
 
A list is a data structures which contains nodes. Each node has a value and pointers/references to the next and previous elements.
 
11:06 AM
Oh
Now that makes sense!
 
Therefore, to add an element in the middle of a list, you only have to change a few pointers.
 
2 pointers, I think
To point to the new value, right?
 
To add an element in the middle of a vector, you have to reassign every element at the right of the insertion point.
@IsmaelMiguel Well, you have to assign two pointers in the new element and one in each of its neigbours.
 
But you only change 2 pointers
 
Insertion in a list is O(1), insertion in a vector is O(n).
 
11:09 AM
But lists may burn more memory than vectors
If you use 64 bit systems
 
@IsmaelMiguel Actually, from a complexity point of view, we don't care how many pointers. We know that it's a small constant number of pointers and that's all that matters. That's the whole point of complexity: ignore constant factors.
Lists use more memory, yeah. Like 4 to 5 times more memory. But that's still a constant factor. If your elements are really big, the cost of storing the pointers is not noticeable.
 
Except on 64 bit systems
 
Bottom line: if you store small elements, a vector might be faster. If you store big elements, a list might be the right tool.
 
I really though they were the same
 
@IsmaelMiguel 4 times a 64 bits pointers is still trivial if you have a list of 16x16 matrices of long double for example.
 
11:13 AM
What's a long double?
 
In C++, there's also std::deque which might be an alternative to std::list and std::vector in some cases but I never got to use it. Anyway, iy you need speed, try the different collections, and time.
 
@IsmaelMiguel twice the size of a double
 
@IsmaelMiguel Implementation-defined, but it tends to be a 80-bit floating point number.
 
I'm reading it on wikipedia
@Morwenn And what's that?
 
@IsmaelMiguel You can see std::deque as a list of small arrays. It allows to add and remove things easily in the middle of a collection whil consuming less memory than std::list.
 
11:17 AM
Basically: an ugly kludge
 
Since the maximum size of the small arrays is probably fixed at compile time, the complexity is reduced. It's interesting in some cases.
 
@IsmaelMiguel C++ doesn't define "how a class is implement", it only tells what methods it has and what are their complexity. If you know a different way to satisfy the requirements, you can implement it your own way.
 
Isn't that thing that you create a function on the top, without a body, and then re-define it below with a body?
 
Well, that's the difference between interface and implementation.
For most of the library, the C++ standard only provides the interface, some guarantees and what the function/class should do. Not how it should do it.
 
11:25 AM
Now I got it
That I can apply some senseless sense and understand
 
From a user perspective, std::list and std::deque are more or less the same thing. Only the complexity guarantees for the methods differ.
But there are not always 5 ways to satisfy the complexity guarantees. So implementations tend to be roughly the same.
 
That also makes sense
But I'm really tired, and working
 
Ok, good luck remembering things :p
 
-2
Q: Get java code to check AP isolation is enabled?

user79230I am building a chat application to communicate locally like IP messenger. When AP isolation is enabled i get only my IP and gateway. That's why i can't chat to others.I am not the administrator of the network. My question how can i check in java that AP isolation is enabled as if i can display a...

-1
Q: get the term before the last from a custom taxonomy

nisr$args = array( 'hide_empty=0' ); $terms = get_terms( 'issue', 'orderby=id&order=DESC' ); if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) { $count = count( $terms ); $i = 0; $term_list = ''; foreach ( $terms as $term ) { $i++; $term_list .= '<a href="' . get_ter...

 
@Morwenn The trick to understanding them is making at least one program with that part of the language you want to understand.
@CaptainObvious RBA
More VTC on the other one.
 
11:38 AM
Also, for people interested: Big-O cheat sheet.
2
 
Incoming meta.
Eh.... I'm impatient.
0
Q: Too much socket, or not enough?

RubberDuckSparked by this meta, I did a quick search for "socket.io" and came back with 21 hits. It seems to be enough to create a tag for it IMO, but I'm no web guy. I don't really understand what this framework is and if it really applies to these questions. A lot of these questions are currently tagged...

 
@Morwenn Luck is something I don't have
 
Also, I'd fire you seems a rather silly thing to say, assuming good practices this should be caught at code review, discussed and should never happen again. This should definitely be caught since we are using the correct warning flags, right? — Shafik Yaghmour 44 secs ago
 
@RubberDuck You're probably right.
 
@RubberDuck Socket.IO is a library that allows you to use websockets in C++ as far as I know
 
11:41 AM
@skiwi Among other things. Also:
 
Ah right, it also has a JS part
I'm still trying to understand why this Qt app has a Socket.IO dependency whereas QML WebSockets also seem to be fine, but need to wait until someone is back from vacation here to get the answer
 
@RubberDuck To me, create the tag
 
@skiwi Ever seen a project using C strings, std::string, QString, POCO strings and a custom string class?
 
@Morwenn Who did that?
 
@Morwenn Luckily not... I have seen the former two
 
11:44 AM
@IsmaelMiguel Some companies develop things like that.
 
@Morwenn But why?
 
Yeah guys. I really don't know what a websocket is. I just know that Socket.Io says it's a framework on their github repo.
 
@IsmaelMiguel That's what you get when using several libraries at once and writing some parts of your code with a specific library in mind then trying to interface the different modules.
 
That's why I asked for an SME to chime in.
 
@Morwenn That sounds like someone barthed some code and then someone picked it up and barthed again. Pretty nasty stuff.
 
11:49 AM
@RubberDuck The JavaScript room on SO might be able to help you if you want to learn a little more about it
 
2
Q: Too much socket, or not enough?

RubberDuckSparked by this meta, I did a quick search for "socket.io" and came back with 21 hits. It seems to be enough to create a tag for it IMO, but I'm no web guy. I don't really understand what this framework is and if it really applies to these questions. A lot of these questions are currently tagged...

 
@RubberDuck In HTML5, a WebSocket is a Javascript API to use sockets to communicate with a server. Usually, the url starts with ws: or wss:.
The biggest example is this chat
It uses a socket to communicate with the server
(The socket is re-opened once in a while, though a request to the server than then sends a wss: URL to use to communicate)
 
The main advantages of a WebSocket are that it keeps the connection open (so low cost as compared to polling) and it provides a two-way channel, so you can actually push things to clients, rather than that they are polling the server
 
@skiwi Actually, it is full-duplex. It's different. This means that you can send and receive a message at the same time.
 
@IsmaelMiguel Ah yes, correct
 

« first day (818 days earlier)      last day (3205 days later) »