Git Product home page Git Product logo

bib_vpr's Introduction

Linux Arch Neovim C CPP CMake Arduino

Go Python C# Shell Script Git GitHub SQLite

What I cannot create, I do not understand.

Richard Feynman

Make it work, make it right, make it fast.

Kent Beck

Hi there 👋

I am a 22 year old developer, open source enthusiast that loves (project based) learning.

For a categorized overview of my projects, see the classic projects page https://github.com/JonasMuehlmann?tab=projects&type=classic.

Development projects are located at https://github.com/JonasMuehlmann?tab=projects&type=new.

Here are a few topics I want to learn more about in the near future:

  • Compiler development
  • computer graphics with vulkan
  • physically based rendering
  • physics(optics and classical mechanics) and simulation
  • high performance computing with CUDA, OpenMP, OpenMPI
  • game (engine) development
  • computer architecture
  • performance engineering

My Github stats

Top Langs

Btw I use arch Arch Linux Logo

bib_vpr's People

Contributors

cjaak avatar jaykim94 avatar jonasmuehlmann avatar linussteinert avatar rayanmirzaie avatar robbeldev avatar

Stargazers

 avatar

Watchers

 avatar

bib_vpr's Issues

Implement logic for private chats

  • Create private chat (team of two users)
    Maybe use the CreateTeam() method of the team service to create a new team and add yourself and another user as members?
    e.g.
CreatePrivateChat(string myUserId, string otherUserId)
{
    // Create team
   // Add myself and other user as members
}
  • List own private chats(Could that be implemented with same logic as the team service?)

Create a joinable chat room

  • SignalR Hub with a unique identifier (Server / SignalR)

  • ChatRoom with a unique identifier (Client / UWP)

  • Members (Client / UWP)

Implementation of reactions

Concept:
image

  • Users are able to react with emojies
    - Reactions are included in the message(map of reaction to count)
    DB schema:
CREATE TABLE Reactions(
Id INT IDENTITY(1,1),
MessageId INT FOREIGN KEY REFERENCES Messages(messageId) NOT NULL,
Reaction NVARCHAR(8) NOT NULL,
Count INT NOT NULL
)
CREATE OR ALTER PROCEDURE AddOrUpdateReaction @messageId INT, @reaction NVARCHAR(8)
AS
BEGIN
	IF  Exists(SELECT * FROM Reactions WHERE Reaction = @reaction AND messageID = @messageId)
	BEGIN
	UPDATE
		REACTIONS
	SET
		Count = Count + 1
		WHERE
		        messageID = @messageId
			AND
			reaction = @reaction;

		SELECT
			Id
		FROM
			Reactions
		WHERE
			messageID = @messageId
			AND
			reaction = @reaction;
	END
	ELSE
	BEGIN
		INSERT INTO
			Reactions
		VALUES(@messageId, @reaction, 1);

		SELECT SCOPE_IDENTITY();
	END;
END;
CREATE OR ALTER PROCEDURE RemoveOrUpdateReaction @messageId INT, @reaction NVARCHAR(8)
AS
BEGIN
	IF  (SELECT r.Count FROM Reactions r WHERE Reaction = @reaction AND messageID = @messageId) = 1
	BEGIN
		DELETE FROM
			Reactions
		WHERE
			messageID = @messageId
			AND
			reaction = @reaction;
	END
	ELSE
	BEGIN
		UPDATE
			REACTIONS
		SET
			Count = Count - 1
			WHERE
				Reaction = @reaction;
		END
END;

Backend tasks:

  • bool Message.AddReaction(uint messageId, string reaction)
  • bool Message.RemoveReaction(uint messageId, string reaction)
  • Dictionary<string, int> Message.RetrieveReactions(uint messageId)
  • Integrate with SignalR

Frontend tasks:

  • UI controls for adding reactions
  • List emojis in grid
  • Filter emojis via search
  • Filter emojis via categories
  • Displaying reactions

Help wanted on:

  • Frontend tasks

Handling Username in UserService.GetOrCreateUser()

GetOrCreateUser()

Currently, the function trims the group information out from the username. (e.g. "Jawoon Kim / PBT3H19A" => "Jawoon Kim").
The username itself, however, is not being forced to have this format and could potentially cause problem if the user logs in with a personal account(which does not have group information at the end, just the full name).

It should either check if it needs trimming or not and should be handled accordingly before saving to the database.

Implementation of channels

Backend tasks:

  • DB Table
  • Channel class
  • ChannelService
  • Mapper
  • Integration with other SignalRService
  • Integrate with MessengerService
  • Create channel when creating team
  • Delete channels when deleting team
  • Tests

Frontend tasks:

  • UI controls for managing channels (Add, remove, rename, etc)
  • Display of channels in the team view

Help wanted on:

  • Frontend tasks

Implementation of a NameId

To allow duplicated Usernames while enabling the differentiation of usernames, we should implement a NameId.
This NameId would have 3 digits and be shown after the username.
This allows having the users Jonas#001, Jonas#002, etc..

Steps::

  • Implementation in database
  • Handling of NameId assignment when setting a user name (determining appropiate NameId based on existing user names)

Default construct all model classes

Certain types like strings are initialized to null causing exceptions, those members should be explicitly initialized to a sensible default (e.g. empty string).

Refactoring `ChatHubViewModel` to `UWP.ChatHubService`

ChatHubViewModel was originally designed to be a single global instance, which should be shared all across the application.

With the current UI-structure(TeamNav/ChatNav + ChatPage), where navigation and content-display are completely separated, it should be easier to have a singleton service that each UI-element can independently access.

Plan is to remove ChatHubViewModel and create a new service on the front-end side (Messenger(UWP).Services).
No changes will be made on back-end.

`DBNull` can not be safely converted to other types.

csharp> Console.WriteLine(Convert.ToInt32(DBNull.Value));

System.InvalidCastException: Object cannot be cast from DBNull to other types.
  at System.DBNull.System.IConvertible.ToInt32 (System.IFormatProvider provider) [0x00000] in <efe941bb62534dc3a62ceb1a818964a0>:0
  at System.Convert.ToInt32 (System.Object value) [0x00003] in <efe941bb62534dc3a62ceb1a818964a0>:0
  at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x00000] in <2ebe5a723a1e431d8197b8959c2e175a>:0
  at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x00038] in <926cad834166473d8b2797acb6f18eea>:0
  at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <f02cdd3a74474a01ba4f3cc438222cdd>:0

In some parts of our code we have statements like the below in in functions returning a uint?, in case of DBNull values being returned from ExecuteScalaer(), this throws an exception, as you can see above.
return Convert.ToUint32(scalarQuery.ExecuteScalar());

The returns should use the nullish coalescing operator (??) to conditionally return null or the correct value.

Edit: The nullish coalescing operator (??) does not work, because DBNull is not null, it should be solvable with an explicit comparison to null(something like if ( foo is DBNull)) instead.

Don't `catch (Exception e)`

Instead of using catch (Exception e) when doing error checking on SQL actions, we should use catch (SqlException e).
catch (Exception e) is an anti-pattern and makes debugging false application behaviour harder than it needs to be, because we also catch errors, which we should not actually catch and don't even handle.

Implementation of roles

Concept:

  • Roles are defined per team
  • A users roles are included in the membership(comma separated string?)
  • Available roles are included in the team(List<string> for the class, comma separated string for the table?)

Backend tasks:

  • async Task<bool> Team.AddRole(string role, uint teamId)
  • async Task<bool> Team.RemoveRole(string role, uint teamId)
  • async Task<bool> Team.AssignRole(string role, string userId, uint teamId)
  • async Task<bool> Team.UnassignRloe(string role, string userId, uint teamId)
  • async Task<List<string>> Team.ListRoles(uint teamId)
  • async Task<List<string>> Team.GetUsersWithRole(uint teamId, string role)
  • async Task<List<string>> Team.GetUsersRoles(uint teamId, string userId)
  • Integrate with MessengerService and SignalRService
  • Remove user roles when deleting team roles
  • Adjust tests
  • Write new tests
  • Adjust other methods
    • Make team creator admin
  • Update production database after merging

Frontend tasks:

  • UI controls for managing roles(Add, remove, assign, unassign)

Help wanted on:

  • Frontend tasks

Connection to SignalR-Hub should be automatically established on user log-in

  • ConnectToTeams()

    // Loads current user data
    UserDataService.GetUserAsync().ContinueWith(async (task) =>
    {
    if (task.Exception == null)
    {
    User = task.Result;
    // Subscribes to hub groups
    // await ConnectToTeams(User.Id);
    await SignalRService.JoinTeam("1");
    await SignalRService.JoinTeam("2");
    await SignalRService.JoinTeam("3");
    // Subscribes to "ReceiveMessage" event
    SignalRService.MessageReceived += ChatService_MessageReceived;
    }
    else
    {
    ErrorMessage = "Unable to fetch user data";
    User = null;
    }
    });
    should be done in UserDataService, specifically OnLoggedIn
    private async void OnLoggedIn(object sender, EventArgs e)
    {
    _user = await GetUserFromGraphApiAsync();
    UserDataUpdated?.Invoke(this, _user);
    }

  • ChatHubViewModel should only provide user interface of the hub

Namensvergabe bei und nach Registrierung

Einem User sollte es möglich sein bei der Registrierung aber auch später, zu jeder Zeit, seinen Namen ändern zu können.

- [ ] Namensvergabe bei Registrierung

  • Namensvergabe zu jeder Zeit

Depends on #6

Implement image sharing

  • Upload
  • Download
  • Download in custom dir
  • Remote storage
  • Local cache
  • Sending images(with messages?)
  • Tests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.