Overview
Note: The job description includes a test task that is mandatory to be considered for this position. Candidates who do not complete the task will not be considered. Candidate must have their own Mac system/machine. So Mac system is mandatory for all candidates.
Spiderweb Technologies is a dynamic and innovative tech company that specializes in developing cutting-edge mobile applications. We are committed to providing high-quality, user-centric products that meet the evolving needs of our customers. Our team values creativity, collaboration, and the continuous pursuit of excellence.
Position Overview:
We are looking for a skilled Flutter Developer with expertise in Android and Swift to join our team. The ideal candidate will have a strong foundation in mobile app development, with a particular focus on creating seamless, responsive, and visually appealing applications. You will be responsible for designing, developing, and maintaining high-quality mobile applications that enhance user engagement and satisfaction.
Key Responsibilities:
- Design and build advanced applications for the Flutter platform.
- Collaborate with cross-functional teams to define, design, and ship new features.
- Ensure the performance, quality, and responsiveness of applications.
- Identify and correct bottlenecks and fix bugs.
- Help maintain code quality, organization, and automatization.
Flutter Developer Assignment: The Unstable Ticker
Objective
This assignment goes beyond typical coding exercises. We aim to assess your ability to architect robust systems, diagnose subtle data issues, justify your engineering decisions, and prove your application's performance. Your analytical skills and the quality of your reasoning are as important as the code you write.
The Scenario
You are tasked with building a stock tracker that consumes data from a new, highly unstable internal WebSocket feed. This feed is prone to network drops, corrupted data, and occasional bizarre anomalies, all of which must be handled before the data is displayed to users.
Provided Assets: Unreliable WebSocket Server
You must use the following Dart code as your data source. Save it as mock_server.dart and run it using.
mock_server.dart
(You must not modify this server code.)
Server Code (Dart)
// File: mock_server.dart
import 'dart:io';
import 'dart:convert';
import 'dart:async';
import 'dart:math';
final Map
'AAPL': 150.00,
'GOOG': 2800.00,
'TSLA': 700.00,
'MSFT': 300.00,
'AMZN': 3400.00,
};
final Random _random = Random();
final List
void main() async {
final server = await HttpServer.bind(InternetAddress.loopbackIPv4, 8080);
print('Server listening on ws://${server.address.host}:${server.port}');
server.listen((HttpRequest req) {
if (req.uri.path == '/ws') {
WebSocketTransformer.upgrade(req).then((WebSocket socket) {
_handleSocket(socket);
});
}
});
Timer.periodic(const Duration(seconds: 1), (timer) {
_updateAndBroadcast();
});
}
void _handleSocket(WebSocket socket) {
print('Client connected!');
_sockets.add(socket);
if (_random.nextDouble() < 0.5) {
final disconnectTime = Duration(seconds: 10 + _random.nextInt(20));
Timer(disconnectTime, () {
if (_sockets.contains(socket)) {
print('Simulating a network drop for a client.');
socket.close();
}
});
}
socket.listen(
(data) {},
onDone: () {
print('Client disconnected!');
_sockets.remove(socket);
},
onError: (error) {
print('Client error: $error');
_sockets.remove(socket);
},
);
}
void _updateAndBroadcast() {
_stocks.forEach((ticker, price) {
final change = (_random.nextDouble() * 2 - 1) * (price * 0.01);
_stocks[ticker] = max(0, price + change);
});
final data = _stocks.entries
.map((e) => {'ticker': e.key, 'price': e.value.toStringAsFixed(2)})
.toList();
// Failure Case 1: Malformed JSON
if (_random.nextDouble() < 0.1) {
print('>>> Sending malformed data...');
for (final socket in _sockets) {
socket.add('{"ticker": "MSFT", "price": }');
}
return;
}
// Failure Case 2: Logically Anomalous Data (NEW)
if (_random.nextDouble() < 0.08) {
print('>>> Sending anomalous price for GOOG...');
final anomalousData = List
final googIndex = anomalousData.indexWhere((d) => d['ticker'] == 'GOOG');
if (googIndex != -1) {
// Price drops by over 95%, which is syntactically valid but logically suspect
anomalousData[googIndex]['price'] = (_stocks['GOOG']! / 20).toStringAsFixed(2);
}
for (final socket in _sockets) {
socket.add(jsonEncode(anomalousData));
}
return;
}
// Good Data Broadcast
if (_sockets.isNotEmpty) {
print('Broadcasting price updates...');
for (final socket in _sockets) {
socket.add(jsonEncode(data));
}
}
}
Core Functional Requirements
UI Display:
- A single screen that displays a list of all stocks.
- For each stock, show its ticker and latest valid price.
- When a price increases, flash the price text green. When it decreases, flash it red.
Connection Status:
- A persistent UI element must show the connection status: Connecting, Connected, Reconnecting, Disconnected.
Advanced Challenge #1: Network Resilience
- The application must never crash or become unresponsive due to network issues or corrupted data.
- If the WebSocket connection is lost, the app must automatically try to reconnect using an exponential backoff strategy
(e.g., wait 2s, 4s, 8s, doubling until a cap of 30s is reached).
- Malformed JSON messages must be safely discarded without disrupting the application.
Advanced Challenge #2: Data Validation & Anomaly Detection
- The server will occasionally send data that is syntactically valid but logically anomalous (e.g., a high-value stock's price
dropping by over 90% in one second).
- Your task is to define and implement a heuristic to detect these anomalies.
- When an anomaly is detected for a stock:
- You must not display the anomalous price. Continue to show the last known valid price.
- The affected stock in the list must be visually flagged (e.g., with a warning icon or different text style) to indicate its
data feed is currently suspect.
Advanced Challenge #3: Performance Optimization
- The application must remain performant and smooth, with minimal UI jank.
- Your state management and widget structure must be efficient, preventing unnecessary rebuilds of list items that have
not changed.
- You will be required to prove the performance of your solution using Flutter DevTools.
Deliverables
Source Code:
- A link to a public Git repository (e.g., GitHub) with your complete Flutter project.
Mandatory README.md File:
- A comprehensive README.md file in your repository is critical for evaluation. It must contain the following sections:
Setup Instructions:
- Clear instructions on how to run the application and the tests.
Architectural Decisions:
- Justify your choice of state management, project structure, and overall approach to separating concerns (data, logic, UI).
Anomaly Detection Heuristic:
- Clearly describe the rule(s) you created to detect anomalous prices.
- Explain the trade-offs of your chosen heuristic. For example, how might your rule behave during a real, legitimate market crash? What are its potential false positives or negatives?
Performance Analysis:
- Include a screenshot of the Performance Overlay from Flutter DevTools while the app is running and receiving updates.
- Write a brief analysis explaining how your architectural choices contribute to keeping the UI and Raster threads green (i.e., preventing jank).
Evaluation Criteria
- Problem Analysis & Critical Thinking: How effectively did you define and justify your anomaly detection heuristic? Howwell did you analyze trade-offs?
- Architectural Quality: Is the code well-structured, testable, and maintainable? Is there a clear separation of concerns?
- Code Quality & Robustness: Is the code clean, efficient, and resilient to all failure cases presented?
- Communication: How clearly and thoroughly did you document your decisions in the README.md?
Time Expectation:
- We estimate this assignment will take 4–5 hours. Please prioritize solving the critical challenges and documenting your thought process over adding minor UI polish. Good luck.
Requirements:
- Proven minimum 2 years of experience as a Flutter Developer.
- In-depth knowledge of Android and Swift.
- Experience with third-party libraries and APIs.
- Solid understanding of the full mobile development life cycle.
- Strong knowledge of UI design principles, patterns, and best practices.
- Excellent problem-solving skills and the ability to work in a team.
How to Apply:
Please submit your resume and any relevant portfolio links or project samples that demonstrate your expertise in Flutter, Android, and Swift development. Email your submission to amitgarg87@gmail.com. Don’t forget to include your completed assignment as described above.
Spiderweb Technologies is an equal opportunity employer. We celebrate diversity and are committed to creating an inclusive environment for all employees.
Job Type: Full-time
Pay: ₹15,000.00 - ₹40,000.00 per month
Benefits:
- Work from home
Schedule:
- Evening shift
- Fixed shift
Supplemental Pay:
- Yearly bonus
Education:
- Bachelor's (Preferred)
Experience:
- Flutter developer: 2 years (Required)
Work Location: Remote
Application Deadline: 02/07/2025