Paul Sweatte
  • Member for 5 years, 2 months
  • Last seen more than 2 years ago
  • "nothing is longer term than a short term solution" "Productivity = Work / Browser Tabs"
two level code review using git pull request in BitBucket
4 votes

Bitbucket has a policy feature which can enforce two-levels of review without any process changes: The easiest policy is to enforce that a few people look at the new feature or bug fix before it's ...

View answer
Best Practice for handling data sync with React Native, MobX and REST?
Accepted answer
3 votes

The best practice is to use persistent storage which facilitates offline-first development and offers built-in client/server data sync, such as PouchDB/CouchDB: The PouchDB API provides a method for ...

View answer
Disadvantages of using vanilla code for a Single Page Application
2 votes

The main disadvantages versus using libraries are the need for: custom JavaScript to handle browser specific implementation differences custom CSS to handle mobile, tablet, and desktop custom ...

View answer
Does placing an httpd server in front of a Vert.x application defeats Vert.x's purpose?
2 votes

The C10K problem is the issue: Apache creates processes and threads to handle additional connections. The administrator can configure the server to control the maximum number of allowable processes. ...

View answer
Custom object formatting caveats as to not confuse end users
2 votes

As cool as making custom formatting directives are is there some sort of mantra I should try to follow where I can try and keeps things simple initially while not hiding or confusing users about where ...

View answer
Why is JSX good, when JSP scriptlets are bad?
2 votes

In short: Front-end developers are expected to know scripting and templating JSX and JSP are both templating languages JavaScript is a scripting language Java is not a scripting language References ...

View answer
Where do you put your profiling code?
2 votes

SQLite separates the test files as follows: The "typical" workload is generated by the speedtest1.c program in the canonical SQLite source tree. This program strives to exercise the SQLite ...

View answer
How to improve my workflow (git, symfony, composer, bower, grunt)?
2 votes

For the config.yml, an environment variable would be a more modern setup: # app/config/config.yml parameters: vendor: '%env(VENDOR)%' Having a second yaml file with a default directory would ...

View answer
how to design redux actions involving chained side effects?
2 votes

In general, just look for the message that has enough data to be actionable. For example, if a websocket passes a message, add that to the store: myWebSocket.onmessage = function (event) { store....

View answer
What are the advantages/disadvantages of using record and playback for regression testing?
2 votes

For web applications, most recorders translate clicks to XPath queries which are position based or CSS selectors which use only class names or ID attributes, so when the DOM structure changes, the ...

View answer
JSON or XML for parsing for Google Map API
Accepted answer
1 votes

Ono is pretty straightforward: ONOXMLDocument *document = [ONOXMLDocument XMLDocumentWithData:data error:&error]; for (ONOXMLElement *element in document.rootElement.children) { NSLog(@"%@: %...

View answer
Concept to validate objects across languages?
1 votes

The phrase I've come across for this is single source of truth: In information systems design and theory, single source of truth (SSOT) is the practice of structuring information models and ...

View answer
Deploy a NodeJs (FrontEnd) and a Spring (BackEnd) project as one artefact
1 votes

Ant or Maven are usually used for this. For example, Apache Wicket calls npm and Grunt from within the pom.xml: <artifactId>wicket-js-tests</artifactId> <packaging>jar</packaging&...

View answer
Efficient development process for Golang (or any backend) and JavaScript?
1 votes

Use the following process: Consolidate the Golang template compilation and web developer tool debugging into node.js by finding a parser and a DOM emulator. Here are a few: jsdom - npm xmldom - npm ...

View answer
How can I interact with a client-side sound device through a web application?
1 votes

There is a Web Speech API: This specification defines a JavaScript API to enable web developers to incorporate speech recognition and synthesis into their web pages. It enables developers to use ...

View answer
Is it ever ok to have an empty catch statement?
1 votes

Existence checking is a good use case: // If an exception happens, it doesn't matter. Log the initial value or the new value function logId(person) { let id = 'No ID'; try { id = ...

View answer
Where to place Docker-related configuration files
1 votes

The project directory is the recommended place: In your project directory, create a file named Dockerfile and paste the following: FROM python:3.4-alpine ADD . /code WORKDIR /code RUN pip install -...

View answer
Three phase commit protocol
1 votes

Is that a typo where it says "coordinator moves to the commit state as well?" No. This sentence: In the case where all acknowledgements are received, the coordinator moves to the commit state as ...

View answer
Comet polling eating up CPU
1 votes

The key is to use a timer on the client side. For example: To receive the chat messages of all users from the database table, a timer function is set for 5 seconds using the following JavaScript ...

View answer
Best practices in storing chunks of external code
Accepted answer
1 votes

The best practice is to make sure you can generate YAML from XML as well as XML from YAML: This proposal prescribes an isomorphic rendering in YAML of a subset of the TOSCA v1.0 XML specification ...

View answer
How do webpack and gulp complement each other?
1 votes

Webpack uses loaders to simplify conversion of file formats: Loaders are transformations that are applied on the source code of a module. They allow you to pre-process files as you import or “load” ...

View answer
Securing a private API used by an iOS App
1 votes

OAuth pairing may be a good alternative. For example: During the initial login, the device is uniquely identified and paired with the mobile user's account using the OAuth 2.0 protocol (https://www....

View answer
How does maven internally manage package dependency?
1 votes

Maven uses dependency injection internally. Between version 2 and 3 it switched the implementation from Plexus to Guice: Maven has a long history of using dependency injection (DI) by way of Plexus, ...

View answer
How to handle static-ish content from a CDN with authentication?
1 votes

Are there any reasonably effective measures to discourage idle sharing of this user content? Rate limiting would be the simplest thing to do: So for example, a request coming from a particular IP ...

View answer
Testing Browser/OS combinations
Accepted answer
1 votes

Am I correct in assuming that Chrome and Firefox will be consistent across OS's? No. Firefox on Windows 10 has some issues with slow network connectivity and Chrome on Windows 10 has some issues with ...

View answer
How to unit-test for PHP implicit conversion errors?
1 votes

Use type assertions as annotations in the code: class Author { /** * @Assert\Type("string") */ protected $firstName; /** * @Assert\Type( * type="integer", * ...

View answer
Verify That Filters on a Dataset are Exclusive
1 votes

Use filter functions with type information to do validation. For example, SPARQL uses the following syntax: FILTER( (?open != 1) || (((NOW() - xsd:datetime(?DATA_S)) References Making SPARQL Filter ...

View answer
Site search SERP URLs don't use query parameter, instead use directory structure? What's up with that?
1 votes

It can be one of the following: Storing to the database, and mapping URL paths to database queries Storing to a file, and mapping URL paths to file names Storing to memory, and mapping URL paths to ...

View answer
What is the use of the prefix "for(;;);" in an Ajax response
1 votes

The prevention of JSON hijacking is the use case: Evil websites on other domains can't make AJAX requests to get this data due to the same-origin policy, but they can include the URL via a <...

View answer
Would onpushstate be an anti-pattern?
1 votes

Here is the rationale: Under normal circumstances, if you start at page A, pushstate to page B, refresh, and go back to A, we don't change the document -- the document you got from refreshing B gets ...

View answer