Developing SDK for a Device? [on hold]

I need to develop a SDK that will run on a device. This SDK should faciliate communication between any device which is using our SDK and our API Service.

I specify some methods for a device, these are

  1. Register Device (Itself) to the platform
  2. Init Device (After Registration or After Reboot)
  3. Sensors loaded (If any added)
  4. Actuators loaded (If any added)
  5. CRUD(Create/Update/Delete/Get) Sensors
  6. CRUD Actuators
  7. Getting Notification From Sensors and Actuators (ex. If someone whats to turn on/off light)

Now these are what I thought,

I need a class that will keep our API information and some Device Data

public class DeviceSettings {     public string DeviceId { get; private set; }     public string PlatformMqttAddress { get; private set; }     public string PlatformMqttUserName { get; private set; }     public string PlatformMqttPassword { get; private set; } } 

I need a class which is responsible to register device to the platform

public interface IProvisioningDeviceClient {     Task<DeviceRegistrationResult> RegisterAsync(); } 

I need a class which is responsible all the crud operations on the device

public interface IDeviceServiceClient {     Task<Device> GetDeviceInformation(string deviceId);     Task<Sensor> CreateSensorAsync(string sensorName, string currentValue, bool twoWayCommunication = false);     Task<Sensor> UpdateSensorAsync(string sensorId, string sensorName, string currentValue);     Task RemoveSensorAsync(string sensorId);     Task<List<Sensor>> GetSensorsAsync(string deviceId); } 

In addition to that I need a class which is responsible to Init Device. Init means it should get its device information, sensors and actuators from platform whenever device is rebooted or after registration process.

After getting these information from platform, it should subscribe these sensors and actuators with a mqtt connection. If another device (which is in the platform) wants to turn the light on by using our device, our device should get a notification from the platform

So I named another class as DeviceManager. Then I recognize I should inject IDeviceServiceClient to the DeviceManager because if any crud operation occurs on any sensor on the device, DeviceManager must manage its subscriptions. For example, it should unsubscribe the sensors that is deleted. If any new sensor added to the device, it should subscribe it automatically. Then DeviceManager started to manage CRUD operations too by using IDeviceServiceClient. It seems fine to me.

Then I think DeviceManager should be singleton because I want only one connection point to the platform from a device. This should be managed by one single instance.

public sealed  class DeviceManager {     private static readonly DeviceManager instance = new DeviceManager();      static DeviceManager()     {      }      private DeviceManager()     {      }      public static DeviceManager GetInstance     {         get         {             return instance;         }     }      private static bool IsConnected;     private readonly IDeviceServiceClient _deviceServiceClient;     private readonly IDeviceManagementServiceClient _deviceManagementServiceClient;     private readonly DeviceSettings _settings;      public Device Device { get; set;  }     public DeviceManagementModule DeviceManagementModule { get; set; }     public List<Sensor> Sensors { get; set; }      public async Task InitAsync()     {         var sensors = await _deviceServiceClient.GetSensorsAsync(_settings.DeviceId);        //todo subscription      }      public void AddSensor(){ //todo }     public void UpdateSensor() { //todo }      public void DeleteSensor() { //todo }       public event EventHandler<SensorNotification> SensorEventHandler;     public void OnDeviceManagementEvent(Notification notification)     {         //devicenotificaitona map etmeliyiz         DeviceManagementEventHandler?.Invoke(this, new DeviceManagementNotification());     }     public void OnSensorEvent(Notification notification)     {         if(Sensors != null)         {             var sensor = Sensors.FirstOrDefault(x => x.Id == notification.Id);              if (sensor == null)             {                 //Logging             }             else             {                 var sensorNotification = new SensorNotification()                 {                     SensorId = sensor.Id,                     SensorName = sensor.Name,                     Data = notification.Data,                 };                  SensorEventHandler?.Invoke(this, sensorNotification);             }         }         else         {             //Logging         }     }     public async Task PushDataToPlatform(string sensorId, string message)     {       }  } 

How should I design DeviceManager class ? Should it be singleton ? These are all concepts as you guessç Not actual implementation. If you have any experiences, I need your advice to design a simple sdk for a device to communicate with a platform. What should I do to make it better ?

What are the pros and cons of companies like Apple or Google developing their own programming languages? [on hold]

Even thought they are promoted as being open source and community owned, it seems that languages like Go or Swift (what are other good examples?) are owned by big companies that have a lot of influence on design decisions of these languages.

So I wonder: Why do these companies develop own programming languages? Is this good for programming and the software business in general? Is it good for society?

Developing an automated lawn mower that searches N by N grid

I am developing software for a lawn mower that will mow all grass on an N by N grid. The grid contains boulders at certain grid spots. For example, there may be boulders on grid coordinates [3,2] and [5,1]. The mower cannot go over the boulder.

Currently my mower works for grids that only have 0-1 boulders. Some of the harder maps will contain 10 boulders on a 6 by 6 grid, which my mower seems to fail most of the lawn with.

My current algorithm is flawed in that I am looking at the mower on the start location, scanning its surrounding boxes and then going to a grid piece if it has grass to mow. My problem is that if the current grid my mower is on detects a grass to the east and a grass to the west, it will just go to the east and forget about that grass it detected to the west.

Should I change my algorithm to DFS? Should I use backtracking? Is this a graph problem? Any suggestions on a better algorithm?

Developing android apps without android studio. VIM IDE

I wonder if it is possible to develop android apps on linux without android studio? I prefer vim instead. I have already installed android sdk, and wanted to compile, and then run this kind of applications. I heard that its possible because sdk implements some kind of virtual machine that is able to simulate android environment. Have you got any ideas how to do this ?

Developing C++ knowledge, not using videogames [on hold]

I’m looking to improve my knowledge of C++. The issue is most of the projects I come across to try and improve my knowledge are in developing videogames. This doesn’t particularly interest me…

Can anyone advise any other areas that C++ are used in, I’m interested in learning about networking and/or cyber security if this can be achieved with C++?


What is the process of developing a secure software in NSA, CIA or FBI

I’m interested to know how CIA, NSA and FBI secure their software when they’re developing a software. My company builds software and products that we would like to make it more secure so that we can prove to our customers that our products are safe. We’ve come across tools like source code auditing. But what else do we need to think of when developing software and products? We have been looking into SQL injections and Source Code Auditing tools. Does the NSA conduct some for of security audits for example? Please give example from start to delivery and maintenance if possible.

Is it good or common practice to have base fragments when developing android mobile application?

I’m creating a mobile app for a software design unit that I’m taking. Since I had multiple activities with similar layouts for the fragments(all implements recycler view) I created an abstract base fragment and all other child fragments extend this fragment. However, since they all display different kinds of data I created a set adapter method which sets the adapters for each fragment.

However, my professor told me for android applications it is difficult to illustrate a design pattern because of how their views so I feel like I’ve been over-complicating things?

The only advantage I see currently is that it reduces duplicated code.

Advice on developing a “word ladder” finding program

I am a college student studying Computer Science. For the final programming assignment of the course I’m enrolled in I have to make a java program that can find the shortest possible word ladder between two words. The assignment is very open-ended and I’m unsure how to tackle it, so I’d like advice on what approach I should take.

I understand that this is a relatively subjective question, but I hope it won’t be considered so subjective that the question should be closed.

It’s hard to explain what a “word ladder” is, so let me use an example. Here is a word ladder from DOG to CAT.

1: DOG

2: COG

3: COT

4: CAT

Each step from one to four is a real word, and only one letter is changed each time. I have been provided a text file that holds all the words that can be used in the program.

How should I approach this problem?

Can someone give me a clear roadmap for developing a streaming service in 4 months? [on hold]

I am a computer science student and I aspire to create an audio streaming service where users can upload and listen to content from others.

Now, I would like to know what are the necessary steps to achieve this goal. I want do something in the vein of Youtube and Twitch but for audio.

I was thinking of doing a progressive web app so I could easily target all platforms including mobile. Now, I don’t have much money to host a website so I might end up just doing a mobile app and a desktop app that would communicate with some free audio streaming file hoster service on the back end.

How do I manage accounts and who uploads what?

I am lost and don’t know where to start. I know javascript, java and python did some basic websites mostly just html and css. Did some node.js and some JavaFx programs.

I would truly be grateful if someone would provide a road map of the journey to make a streaming service. I am not afraid to learn. I just want to learn things that are relevant to my goals.

Summer vacation is near for me and I have roughly 4 months of free time for this project.

Guidelines for developing search engine

I’ve been asked to research the redevelopment of a university search engine. The existing search engine looks for students and how much funding they have through by way of a grant.

The existing search engine is an expert system that has about 40 fields. Users typically only need 4 or 5 fields but these can vary depending on the task.

I’m approaching this by building a basic prototype which I’ll use to drive out deeper needs from users.

But my question is this: is there any specific guidelines or evidence that would help me build a good search engine? What things should I be looking to build? What features?