Home » Programming Languages » Page 3

I am part of a proof of concept team at the moment and I'm playing
around with hadoop and all it's great additional things like hbase and
hive.



I also found sqoop for loading data from rdbms into hdfs.



What I don't know so far is if there are any tools from streaming
data from SQL Server into hdfs in real time.



I know that this is possible for mysql with the Applier for
Hadoop.



href="https://dev.mysql.com/tech-resources/articles/mysql-hadoop-applier.html"
rel="nofollow">https://dev.mysql.com/tech-resources/articles/mysql-hadoop-applier.html



Are there any tools or plugins for my situation?

For example:




Only job applications that are not yet in review or approved, can
be updated. In other words, a person can update his job appliance form
until HR starts reviewing it, or it's already acepted.




So a job application can be in 4 states:




APPLIED(initial state), IN_REVIEW, APPROVED, DECLINED




How do I achieve such behavior?




Surely I can write an update() method in Application class, check
Application state, and do nothing or throw exception if Application
is
not in required state




But this kind of code does not make it obvious such a rule exists,
it allows anyone to call update() method, and only after failing a
client knows such operation was not permitted. Therefore client needs
to be aware that such an attempt might fail, therefore take caution.
Client being aware of such things also means that logic is leaking
outside.



I tried creating different classes for each state
(ApprovedApplication etc.) and put allowed operations on only allowed
classes, but this kind of approach feels wrong too.



Is there an official design pattern, or a simple piece of code, to
implement such behavior?

Here's an example:



I have a chat module in my app, and there's a ChatService
class that is responsible for networking, and there's a
ChatNotificationService helper class that is responsible for
sending out and receiving broadcasts of messages, and there's also a
ChatNotificiationDelegate protocol that has methods on it
that get called when a notification arrives.



In order to test message sending, in theory I could just call
ChatService.sendMessage() and check if the
ChatNotificationDelegate.didSentMessage() got called.



However, sending a message calls several different methods before
it gets to the delegate. It sends the message to the server, the
server then sends a response that triggers sending of the
notification, and the notification service then receives the
notification and calls the delegate method.



This whole chain can be covered by one unit test, or I could test
each piece of functionality separately.



What I'm asking is which approach should I take on this, test every
bit we know exactly what went wrong, or to make my tests as general as
possible (just the endpoints) to allow more freedom of refactoring the
code.

On Windows OS, using start keyword to start file (e.g
start Text.txt



works on prompt, but on git it doesn't work it return Err



 /bin/start: line 8: cmd: command not found


only this keyword return this Err on git

Given a bounded priority queue (with keys between 1 and k), is
there any data structure with amortized constant time for delete min
and insert and find min, where the worst case time for these
operations is not constant.

I'm in the midst of an argument with some coworkers over whether
team ownership of the entire codebase is better than individual
ownership of components of it.



I'm a huge proponent of assigning every member of the team a
roughly equal share of the codebase. It lets people take pride in
their creation, gives the bug screeners an obvious first place to
assign incoming tickets, and helps to alleviate "broken window
syndrome".



It also concentrates knowledge of specific functionality with one
(or two) team members making bug fixes much easier.



Most of all, it puts the final say on major decisions with one
person who has a lot of input instead of with a committee.



I'm not advocating for requiring permission if somebody else wants
to change your code; maybe have the code review always be to the
owner, sure. Nor am I suggesting building knowledge silos: there
should be nothing exclusive about this ownership.



But when suggesting this to my coworkers, I got a ton of pushback,
certainly much more than I expected.



So I ask the community: what are your opinions on working with a
team on a large codebase? Is there something I'm missing about
vigilantly maintaining collective ownership?

We are trying to adopt the microservice approach to our newly
developed application.



However, we found that there are too many repos, branches, and
releases need to be managed. Originally, we only have 2~4 repos to
manage for an application. After adopting the microservice approach,
we may have 10~20 repos for an application with the same
complexity.



So, are there any best practices on how to manage these
microservices of a large application?

So I'm making a bug tracker to help me learn Ruby on Rails. My
current setup is something like this:




  1. Each Project has_many :metadata and
    has_many :permissions, through: :metadata. Also some
    other stuff, but that's all that's relevant to this question.

  2. Each Metadatum (bad name, I know, but it'll work for
    now) has_many :permissions, and belongs_to
    both :project and :person.

  3. Each Permission belongs_to :metadatum,
    and both has_one :project, through: :metadatum and
    has_one :person, through: :metadatum. It represents one
    person being able to do one thing on one project -- for example, add a
    new bug, or assign someone to a bug, etc. etc.



Now, my question is if this is a good way to go about adding
different levels of permission that are different for each project --
so, for example, Project Manager Eve can't edit Project Manager Bob's
projects just because she's a PM too, and QA James can't add lots of
bugs to a project he isn't supposed to be testing.



It makes sense to me because each project has metadata that applies
to everyone (which is stored in Project) and individual
metadata for each person (which is in Metadatum and
includes stuff like if they've starred it or if they've assigned it a
custom name). To me, it's sensible that Metadatum would
also store the permission level, since that's dependent on the project
and person both.



However, I'm concerned about space usage, though I don't know if I
should be. It would be fairly trivial to change it to use some
bitmasking magic to do the same thing, but my concern about that is
that it's less readable, and only allows a certain amount of
permissions to be added before running out of room in a number. I'm
also concerned that it'll take longer to check if someone is allowed
to do something than bitmasking, because instead of permission
& 1<<12
you have to check
project.permissions.find_by(person: person, allows:
:allowance)
, which involves filtering twice, and isn't as
readable. However, it's conceptually simpler to understand, and custom
methods could easily be written to simplify the syntax.



Have I got the best approach? How can I do it better?

I have a colleague who wants to use the values from one table as
the column headers for another query. I have searched the web and
various other forums but cannot find out if this is possible or not
(it looks like it isn't possible).



If anyone can assist then that would be great - even if it confirms
that this is not possible.

Context is a single page app with a rest backend.



For things like state and city lists, which rarely change, is it
better to store them on server and load from client, or store them
directly on client as javascript objects?



I am in favor of putting them on client to avoid writing
boilerplate code (things like when state is selected city combo will
be filled from server etc), but don't know if there's a downside.


- Technology - Languages
+ Webmasters
+ Development
+ Development Tools
+ Internet
+ Mobile Programming
+ Linux
+ Unix
+ Apple
+ Ubuntu
+ Mobile & Tablets
+ Databases
+ Android
+ Network & Servers
+ Operating Systems
+ Coding
+ Design Software
+ Web Development
+ Game Development
+ Access
+ Excel
+ Web Design
+ Web Hosting
+ Web Site Reviews
+ Domain Name
+ Information Security
+ Software
+ Computers
+ Electronics
+ Hardware
+ Windows
+ PHP
+ ASP/ASP.Net
+ C/C++/C#
+ VB/VB.Net
+ JAVA
+ Javascript
+ Programming
Privacy Policy - Copyrights Notice - Feedback - Report Violation 2018 © BigHow